diff --git a/docs/html/google/play-services/setup.jd b/docs/html/google/play-services/setup.jd
index d886454f3c996..413000fbb3ada 100644
--- a/docs/html/google/play-services/setup.jd
+++ b/docs/html/google/play-services/setup.jd
@@ -43,8 +43,8 @@ to Adding SDK Packages
dependencies for the latest version of
- play-services.
- For example, for mobile modules:
+play-services. For example:
apply plugin: 'android'
...
dependencies {
compile 'com.android.support:appcompat-v7:20.+'
- compile 'com.google.android.gms:play-services:6.1.+'
+ compile 'com.google.android.gms:play-services:6.5.+'
}
- For wearable modules:
--apply plugin: 'android' -... +-Be sure you update this version number each time Google Play services is updated.
+Note: If the number of method references in your app exceeds the +65K limit, your app may fail to compile. You +may be able to mitigate this problem when compiling your app by specifying only the specific Google +Play services APIs your app uses, instead of all of them. For information on how to do this, +see Selectively compiling APIs into your executable. -dependencies { - compile 'com.google.android.gms:play-services-wearable:6.1.+' -} -
Be sure you update this version number each time Google Play services is updated.
@@ -99,13 +95,112 @@ element:
You can now begin developing features with the Google Play services APIs.
+In versions of Google Play services prior to 6.5, you had to compile the entire package of APIs +into your app. In some cases, doing so made it more difficult to keep the number of methods +in your app (including framework APIs, library methods, and your own code) under the 65,536 limit.
+ +From version 6.5, you can instead selectively compile Google Play service APIs into your app. For
+example, to include only the Google Fit and Android Wear APIs, replace the following line in your
+build.gradle file:
+compile 'com.google.android.gms:play-services:6.5.+' ++ +
with these lines:
+ ++compile 'com.google.android.gms:play-services-fitness:6.5.+' +compile 'com.google.android.gms:play-services-wearable:6.5.+' ++ +
Table 1 shows a list of the separate APIs that you can include when compiling your app, and
+how to describe them in your build.gradle file. Some APIs do not have a separate
+library; include them by including the base library. (This lib is automatically included when
+you include an API that does have a separate library.)
+Table 1. Individual APIs and corresponding build.gradle descriptions.
| Google Play services API | +Description in build.gradle |
+
|---|---|
| Google+ | +com.google.android.gms:play-services-plus:6.5.+ | +
| Google Account Login | +com.google.android.gms:play-services-identity:6.5.+ | +
| Google Activity Recognition | +com.google.android.gms:play-services-location:6.5.+ | +
| Google App Indexing | +com.google.android.gms:play-services-appindexing:6.5.+ | +
| Google Cast | +com.google.android.gms:play-services-cast:6.5.+ | +
| Google Drive | +com.google.android.gms:play-services-drive:6.5.+ | +
| Google Fit | +com.google.android.gms:play-services-fitness:6.5.+ | +
| Google Maps | +com.google.android.gms:play-services-maps:6.5.+ | +
| Google Mobile Ads | +com.google.android.gms:play-services-ads:6.5.+ | +
| Google Panorama Viewer | +com.google.android.gms:play-services-panorama:6.5.+ | +
| Google Play Game services | +com.google.android.gms:play-services-games:6.5.+ | +
| Google Wallet | +com.google.android.gms:play-services-wallet:6.5.+ | +
| Android Wear | +com.google.android.gms:play-services-wearable:6.5.+ | +
|
+ Google Actions + Google Analytics + Google Cloud Messaging + |
+ com.google.android.gms:play-services-base:6.5.+ | +
To make the Google Play services APIs available to your app:
<android-sdk>/extras/google/google_play_services/libproject/google-play-services_lib/ to the location where you maintain your Android app projects.<android-sdk>/extras/google/google_play_services/libproject/google-play-services_lib/
+ to the location where you maintain your Android app projects.Note: When using Android Studio, you must add Proguard
-to your gradle.build file's build types. For more information, see the
+to your build.gradle file's build types. For more information, see the
Gradle Plugin User Guide.