Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The library com.google.firebase:firebase-iid is being requested by various other libraries at [[17.0.0,17.0.0]], but resolves to 16.2.0

I had the same issue. A quick fix would be to disable the strict version checking that is causing this problem. Add

com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true

at the very bottom of your app build.gradle file.


I had the same issue. I solved it by updating firebase messaging to the latest version(at this time).

implementation 'com.google.firebase:firebase-messaging:17.0.0'

to

implementation 'com.google.firebase:firebase-messaging:17.3.4'

and it is resolved(without side effect)


If you had this problem you might see a lot of posts saying that you can disable this check. I don't like doing that because it hides the problem.

After a while I finally understood it was saying that some library was asking for a version I didn't have. So I added this in the build/app/build.gradle and it built

implementation "com.google.firebase:firebase-iid:17.0.2"

Just use the version it says it resolves to, in your case 16.2.0.


For me disabling version check did not solve the problem. What I did is to exclude firebase-iid module from firebase messaging library and add it separately

implementation ("com.google.firebase:firebase-messaging:17.3.4"){
        exclude group: 'com.google.firebase', module: 'firebase-iid'
    }

implementation 'com.google.firebase:firebase-iid:17.0.3'

I had a similar error with 'com.google.firebase:firebase-iid using these firebase dependencies:

  1. implementation 'com.google.firebase:firebase-core:16.0.7'
  2. implementation 'com.google.firebase:firebase-messaging:17.3.4'
  3. implementation 'com.google.firebase:firebase-database:16.0.6'
  4. implementation 'com.crashlytics.sdk.android:crashlytics:2.9.6'
  5. implementation 'com.google.firebase:firebase-functions:16.1.3'

after adding

  • implementation 'com.google.firebase:firebase-analytics:16.3.0'

it went away.