This question already has answers here:
Error : Please fix the version conflict either by updating the version of the google-services plugin
(2 answers)
Closed 5 years ago.
Even after updating the version same error continues to pop up whenever the gradle is built.
Project base gradle
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.google.gms:google-services:3.1.0'
}
**App base gradle **
ependencies {
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:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-auth:10.0.1'
compile 'com.google.firebase:firebase-database:9.2.0'
compile 'com.github.barteksc:android-pdf-viewer:2.4.0'
compile 'com.google.firebase:firebase-storage:10.0.1'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
and the error is shown as follows:-
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.
Please help me to solve the issue.
Your all firebase version should be same.
compile 'com.google.firebase:firebase-database:9.2.0'
update it
compile 'com.google.firebase:firebase-database:10.0.1'
Related
Following this guide, I'm trying to implement notifications through firebase.
I have followed the guide, updated build.gradle:
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:multidex:1.0.1'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:25.3.1'
compile 'com.google.firebase:firebase-crash:9.0.0'
compile 'com.google.firebase:firebase-core:9.0.0'
compile 'com.google.firebase:firebase-messaging:9.0.0'
compile 'com.google.android.gms:play-services-auth:9.0.0'
testCompile 'junit:junit:4.12'
compile('com.crashlytics.sdk.android:crashlytics:2.7.1#aar') {
transitive = true;
}
}
apply plugin: 'com.google.gms.google-services'
However when testing i get the error:
E/DynamiteModule: Failed to load module descriptor class: Didn't find
class
"com.google.android.gms.dynamite.descriptors.com.google.firebase.auth.ModuleDescriptor"
E/FirebaseApp: Firebase API initialization failure.
I have looked at other questions relating to this issue, but there has been no useful solution.
I have also tried modifying dependency version to the latest 11.4.2, only to see the following 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.
Commenting out all dependencies except firebase/play-services, does not resolve the above
A simple solution is that use Fireabase Assistant to initialize the Firebase in your application
First remove all firebase dependency and apply plugin: 'com.google.gms.google-services' from your app gradle ( in Android Studio 2.3.3) follow this step
Tools > Firebase
(On right tab) Assistant > Authentication
I have a conflict with my dependencies, and no matter which version I try that it recommends me, it doesn't solve the issue. Looking around did no help so this is my last resort. Here is my 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 11.0.2.
My Gradle;
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.google.gms:google-services:3.1.0'
}
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:design:26.+'
compile 'com.nightonke:boommenu:2.1.0'
compile 'com.google.firebase:firebase-messaging:11.0.2'
compile 'com.google.firebase:firebase-core:11.0.4'
compile 'com.google.firebase:firebase-ads:10.0.1'
compile 'com.google.android.gms:play-services-plus:11.0.2'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
You should remove following line from gradle
compile 'com.google.android.gms:play-services-plus:11.0.2'
Firebase dependencies must have same version
compile 'com.google.firebase:firebase-messaging:11.0.4'
compile 'com.google.firebase:firebase-core:11.0.4'
compile 'com.google.firebase:firebase-ads:11.0.4'
compile 'com.google.android.gms:play-services-plus:11.0.4'
Error:Execution failed for task ':app:processDebugGoogleServices'.
Please fix the version conflict either by updating the version of the
google-services plugin
You should use SAME versions of FIREBASE & GMS .
Use 11.0.4 .
compile 'com.google.firebase:firebase-messaging:11.0.4'
compile 'com.google.firebase:firebase-core:11.0.4'
compile 'com.google.firebase:firebase-ads:11.0.4'
compile 'com.google.android.gms:play-services-plus:11.0.4'
Finally Clean-Rebuild-Run .
compile 'com.google.firebase:firebase-messaging:11.0.2'
compile 'com.google.firebase:firebase-core:11.0.2'
compile 'com.google.firebase:firebase-ads:11.0.2'
compile 'com.google.android.gms:play-services-plus:11.0.2'
Change these dependency with this version.
I just added firebase support to my android app. At first it worked fine. However, in order to track stacktraces I added the following stuff to my app/gradle.build:
compile 'com.google.firebase:firebase-crash:10.2.6'
such that it looks like this right now:
dependencies {
compile 'com.google.firebase:firebase-core:11.0.0'
compile 'com.google.firebase:firebase-crash:10.2.6'
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.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
However, when I want to start my app now I am getting the following error message:
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.0.0.
I first checked in the SDK manager that everything was up to date and it is:
Since it did not work, I tried to add the required dependency manually like this:
compile 'com.google.gms:google-services:3.1.0'
Didn't work either. What am I doing wrong here?
Make sure following dependencies are using the same version.
compile 'com.google.firebase:firebase-core:11.0.0'
compile 'com.google.firebase:firebase-crash:10.2.6'
Im trying chat application using firebase. Im getting following error which could nit resolve myself,
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/internal/zzble.class
I have mentioned below my gradle file
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:25.3.1'
compile 'com.google.firebase:firebase-core:10.2.4'
compile 'com.android.support:design:25.3.1'
compile 'com.firebaseui:firebase-ui:1.1.1'
compile 'com.google.firebase:firebase-auth:10.2.4'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
FirebaseUI has transitive dependencies on a number of the Firebase libraries. You must specify a version of FirebaseUI that is compatible with the Firebase libraries you are using. The table of compatible versions is listed in the FirebaseUI documentation. The most recent FirebaseUI version is 1.2.0, which works with library version 10.2.0. A version of FirebaseUI for Firebase libs 10.2.4 and 10.2.6 has not been released.
The safe change is:
compile 'com.firebaseui:firebase-ui:1.2.0'
compile 'com.google.firebase:firebase-auth:10.2.0'
You could try 1.2.0 with 10.2.4 or 10.2.6, but may encounter the same problem you are seeing now.
I have the next gradle file:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.0.0-alpha3'
classpath 'com.android.tools.build:gradle:2.0.0-alpha3'
classpath 'com.google.gms:google-services:2.0.0-alpha3'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'org.apache.httpcomponents:httpcore:4.4.1'
compile 'org.apache.httpcomponents:httpclient:4.5'
compile 'org.apache.httpcomponents:httpcore:4.4.1'
compile 'org.apache.httpcomponents:httpclient:4.5'
compile 'com.android.support:design:23.2.1'
compile 'com.loopj.android:android-async-http:1.4.4'
compile 'com.google.android.gms:play-services-base:8.4.0'
compile 'com.google.android.gms:play-services-location:7.3.0'
compile 'com.google.gms:google-services:2.1.0-rc1'
}
I'm getting error in the lines starting with: compile 'com.google.android.gms
The error is:
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 8.3.0.
How I can know what version are available for this specific component?
You should keep the version of com.google.android.gms libraries the same. If you are going to use v. 8.4.0 for the services.base, then you should always keep the others the same. So, you should also set services-location to the same version:
compile 'com.google.android.gms:play-services-base:8.4.0'
compile 'com.google.android.gms:play-services-location:8.4.0'
See Google Play Services for more version information.
Also, here is a similar question that is helpful for general Gradle setup as well: Version conflict updating to 8.4.0