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?