Error:Please Fix the Version Conflict Either by Updating the Version of the Google-Services Plugin

Error Please fix the version conflict either by updating the version of the google-services

Change this:

classpath 'com.google.gms:google-services:3.1.1'

into this:

classpath 'com.google.gms:google-services:4.0.1'

to avoid the mixing version error.

Also update the firebase-core dependency into this:

implementation 'com.google.firebase:firebase-core:16.0.1'

https://firebase.google.com/support/release-notes/android

Error: fix the version conflict (google-services plugin)

I think you change

compile 'com.google.firebase:firebase-messaging:11.0.4'

Error : Please fix the version conflict either by updating the version of the google-services plugin

Use the same version of firebase and Google play services

compile 'com.google.firebase:firebase-database:11.4.2'
compile 'com.google.firebase:firebase-auth:11.4.2'
compile 'com.google.firebase:firebase-storage:11.4.2'

//Remove this dependency
//compile 'com.google.gms:google-services:3.1.1'

//Add this dependency if you need Google play services
compile 'com.google.android.gms:play-services:11.4.2'

Version conflict (google-services plugin)

Update the google-service plugin to 'com.google.gms:google-services:3.3.0'

However, its always better to have same version among the same library file to prevent any project sync crash.

Example,

implementation 'com.google.firebase:firebase-messaging:15.0.2'
implementation 'com.google.firebase:firebase-ads:15.0.2'
implementation 'com.google.android.gms:play-services-auth:15.0.2'
implementation 'com.google.android.gms:play-services-plus:15.0.2'

Error: fix the version conflict (google-services plugin) using productFlavors

The conflict is between a newer version of the plugin and the Play Services/Firebase dependencies.

You cannot apply different versions of the same plugin for different product flavors, thus you will run into this conflict when trying to use different Play Services dependencies in different flavors.

You can:

  • Drop support for the ~1% of users on API levels lower than 14 in new versions of your app
  • Stay on an older Play Services/Firebase version that still supports 14

Error: 'Please fix the version conflict either by updating the version....'

First you have firebase-core added twice in your build.gradle file, so you need to remove the old one which is this:

 implementation 'com.google.firebase:firebase-core:11.8.0'

Second change this:

implementation 'com.google.android.gms:play-services-analytics:11.8.0'

into this:

implementation 'com.google.android.gms:play-services-analytics:16.0.4'

To be able to use firebase dependencies with version 15.0.0+ you need to update the google-service plugin. The first version of this plugin that works with the new versioning system is 3.3.0. The latest version is 4.2.0, therefore update the google-service plugin to the following:

 classpath 'com.google.gms:google-services:4.2.0'

Check the following for more information:

https://bintray.com/android/android-tools/com.google.gms.google-services/4.2.0

https://android-developers.googleblog.com/2018/05/announcing-new-sdk-versioning.html

Android | Cannot add all Google libraries for version 15.0.1



Related Topics



Leave a reply



Submit