I\'ve been previously using google play services 8.3.0 without any issue. I\'m looking to upgrade to google play services 8.4.0. I\'m using the following play libraries:
Removing and reinstalling Google Services from the SDK manager and deleting the contents of your-project/.gradle/ solved it for me
I ran into this issue just now. I upgraded from 7.8.0 to 8.4.0 and received the same error that you did. Rebuilding and/or cleaning the project worked for me.
compile 'com.google.android.gms:play-services:+'
compile 'com.google.firebase:firebase-core:+'
What works for me
When selectively compile Google Play service APIs on 8.4.0, I've also encountered problems (8.3.0 -> 8.4.0).
Error:
Could not find method com.google.android.gms.common.internal.zzx.zzy
Before upgrade:
compile 'com.google.android.gms:play-services-maps:8.3.0'
After upgrade (doesn't work):
compile 'com.google.android.gms:play-services-maps:8.4.0'
After upgrade (works fine):
compile 'com.google.android.gms:play-services-maps:8.4.0'
compile 'com.google.android.gms:play-services-gcm:8.4.0'
Conclusion: it seems like some of the play services now have some certain dependencies that you have to explicitly specify, e.g.: maps -> gcm.
I have face same problem and resolve this issue by configuring proguard rules properly.
What I did here under as below:
First I have excluded google classes from obfuscating like this in proguard-rules.pro:
-keep public class com.google.** {*;}
Second I have enabled this minifyEnabled
in build.gradle like this:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.e2e.quiz"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.github.bumptech.glide:glide:3.6.1'
compile 'com.squareup.picasso:picasso:2.4.0'
compile 'com.google.android.gms:play-services-gcm:9.2.1'
compile 'com.google.android.gms:play-services-analytics:9.2.1'
compile 'com.google.android.gms:play-services-ads:9.2.1'
compile project(':ast-dst')
}
I was able you solve this. My coworker was able to upgrade without issues. I went to my sdk/extras folders saw mine was pretty different. So I moved my folder copied my coworkers and it worked.
I think that folder and maybe something else in the sdk folder had just gotten into an odd state, clearing the folder and redownloading may work too.