In my build.gradle
I was using this:
android {
compileSdkVersion 23
....
....
defaultConfig {
....
targetSdkVersion 23
}
}
....
....
dependencies {
compile 'com.google.android.gms:play-services:9.0.0'
....
....
}
Everything was compiling correctly for me and I was in the process of publishing my app to the Google Play Store and to my surprise, Google did not let me publish it because I was using targetSdkVersion 23
and they wanted for me to use targetSdkVersion 26
minimum. I went ahead and changed my code to use targetSdkVersion 26
and the error I saw said that targetSdkVersion 26
required at least com.google.android.gms:play-services:10.2.1
or higher. I changed the code to this:
android {
compileSdkVersion 26
....
....
defaultConfig {
....
targetSdkVersion 26
}
}
....
....
dependencies {
compile 'com.google.android.gms:play-services:10.2.1'
....
....
}
The error message this time was:
Error:(280, 61) error: cannot access zza class file for com.google.android.gms.common.internal.safeparcel.zza not found
Any ideas to fix what Android is complaining about this time?
UPDATE 1: I had removed the buildToolsVersion
but I included the one for API Level 26:
android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
....
....
}