So this morning I started updating to the latest version of my project libraries.
I'm trying to update GCM to the latest version 9.2.0, but I get this error:
Error:Execution failed for task ':app:processDebugGoogleServices'. Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 9.0.0.
This is how I have my code:
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.google.gms:google-services:3.0.0'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
}
And then:
dependencies {
...
compile "com.google.android.gms:play-services-gcm:9.2.0"
...
}
Anyone having the same issue/fixed the same issue?
Thanks.
EDIT
Apparently you have to apply your GSM plugin at the bottom of your app/build.gradle file. Else, version 9.2.0 will cause conflict in your project.
For reference, this is how my app/build.gradle file looks like now:
apply plugin: "com.android.application"
apply plugin: "com.neenbedankt.android-apt"
android {
...
}
dependencies {
...
// Google Cloud Messaging
compile "com.google.android.gms:play-services-gcm:9.2.0"
...
}
apply plugin: "com.google.gms.google-services"
Do you have the line
apply plugin: 'com.google.gms.google-services'
line at the bottom of your app's build.gradle file?
I saw some errors when it was on the top and as it's written here, it should be at the bottom.
Just put this line at the bottom of your app-module's (not project root's) gradle
file.
apply plugin: 'com.google.gms.google-services'
Then rebuild your project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With