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

Solution 1:

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.

Solution 2:

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)

Solution 3:

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.

Solution 4:

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'