As per this SO thread, I know there are version conflicts, but issue still persists after new versions from Google.
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 10.0.1.
My build.gradle(Module: app)
....
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
compile 'com.google.firebase:firebase-messaging:10.0.1'
compile 'com.google.android.gms:play-services-maps:11.0.4'
compile 'com.google.android.gms:play-services-location:11.0.4'
}
apply plugin: 'com.google.gms.google-services'
What changes are required now?
The google play services requires all its dependencies to have the same version. But if you look at your dependencies:
There is one that has a different version.
It can be solved by changing the version to (in this case)
11.0.4
.This applies to both Firebase and Google Play Services - both have to have matching versions that also correspond with each other. If a Firebase dependency is
10.0.1
and a Google Play Services dependency is11.0.4
, the same error will occur.Note that in some cases, there can be a library that has a different version of a library (e.g. library
x
usesplay-services-games:10.0.1
while you use11.0.4
for the dependencies in your app)For fire base to install properly all the versions of the fire base compiles must be in same version so
this is the correct way to do it.
All google services should be of same version, try matching every versions.
Correct one is :
Incorrect Config is :
install or update google play services. Secondly, check your 'com.google.gms:google-services:3.0.0' version . Check , this by upgrading it if still not work to 3.1.0
Same error gets thrown when
is not added to bottom of the module
build.gradle
file.I think you change