Android Version Conflict for Google Services
If I am not wrong, Google services have the dependency on the firebase. I think both are conflicting
check this firebase.google.com/docs/android/setup and adjust google services and firebase dependency versions
Also, make sure you have this at the bottom of your build.gradle (app)
file:
apply plugin: 'com.google.gms.google-services'
Adifyr
I'm a Full Stack Developer that specializes in Mobile UX Design & Development. Like gaming and reading. Currently exploring Blockchain & NFTs.
Updated on June 26, 2022Comments
-
Adifyr almost 2 years
I've searched for a lot of solutions to this, but none fit my exact case. I am getting this error on Gradle Sync:
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 11.4.2.
this is in my build.gradle (app) dependencies.
dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" implementation 'com.android.support:appcompat-v7:27.0.2' implementation 'com.android.support:design:27.0.2' implementation 'com.google.firebase:firebase-firestore:11.8.0' implementation 'com.google.firebase:firebase-auth:11.8.0' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.1' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' }
and this is in my Project level build.gradle
buildscript { ext.kotlin_version = '1.2.10' repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.0.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'com.google.gms:google-services:3.1.2' } } allprojects { repositories { google() jcenter() } } task clean(type: Delete) { delete rootProject.buildDir }
Also Important: It shows a red line under this line:
implementation 'com.google.firebase:firebase-auth:11.8.0'
The message I'm getting if I hover over it:
All gms/firebase libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 11.8.0, 11.4.2. Examples include com.google.android.gms:play-services-auth:11.8.0 and com.google.firebase:firebase-analytics:11.4.2
I don't even have an analytics dependency!
What do I do?
Already tried solutions:
If I try to change my
com.google.android.gms
version, it will throw me a lint saying not to bundle my entire play services in the dependencies. And it also doesn't change the firebase error I'm getting.Changing firebase to 11.4.2 will throw a lint error.
Changing google play services version to 3.1.1 or below will do nothing.