Google Play Services 9.2.1 And Google-services Plugin
Solution 1:
As a first step, you should identify the specific Play Service APIs your app needs and include only those instead of com.google.android.gms:play-services
. Listing play-services
as a dependency pulls in all of Play Services and causes the 64K limit on method references to be exceeded. This creates problems when running on pre-Lollipop devices.
The complete list of Play Services APIs is provided here and the Firebase APIs are listed here. Find the ones you need and list them in your dependencies instead of com.google.android.gms:play-services
.
To get an understanding of all the libraries that are pulled in when you specify play-services
as a dependency, you can look at this gist or open the Android Studio tool window for Gradle and run the androidDependencies
task under :app\Tasks\android
.
Solution 2:
Firebase is now included in the google-play-services - see https://developers.google.com/android/guides/releases#june_2016_-_v92 . But somehow the play-services on API 19(aka Android 4.4) do not contain usable firebase-files. So what you have do do is, compile only the used APIs from the play-services and exclude the Firebase from them.
So remove line compile 'com.google.android.gms:play-services:9.2.1' and replace with something like compile 'com.google.android.gms:play-services-NAME_OF_USED_API:9.2.1'
Alternative you could use an older Version of the google-play-services that doesn't contain Firebase.
Post a Comment for "Google Play Services 9.2.1 And Google-services Plugin"