I started to get this error today, yesterday everything worked fine, there was no changes in gradle or firebase version
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. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
I saw that yesterday was update in google-services plugin, probably that is causing the problem.
How to fix this problem?
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.