The library com.google.firebase:firebase-iid is be

2020-08-09 04:51发布

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?

19条回答
迷人小祖宗
2楼-- · 2020-08-09 05:08

For me it was the build.gradle file in node_modules/@aws-amplify/pushnotification (the same applies for the build.gradle file in react-native-push-notification)

change the version numbers of firebase packages to match what you have in your own app/build.gradle file.

For me that was

compile 'com.google.firebase:firebase-messaging:17.6.0' compile 'com.google.firebase:firebase-core:16.0.8'

查看更多
戒情不戒烟
3楼-- · 2020-08-09 05:12

I got the same issue. Issue resolved by updating latest firebase-messaging version from https://firebase.google.com/support/release-notes/android

From

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

to

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

I do not know why build error was occurring all on a sudden. It seems weird but When I updated the firebase-messaging version, issue resolved.

查看更多
等我变得足够好
4楼-- · 2020-08-09 05:13

For Android Studio Users Only

I had the same issue. and this is added after apply plugin: 'com.google.gms.google-services' com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true

at the very bottom of your app build.gradle file and my problem was solved

 apply plugin: 'com.google.gms.google-services' 

com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true
查看更多
Animai°情兽
5楼-- · 2020-08-09 05:13

I think I am late here to answer this but maybe this solution will solve someone's problem.

In build.gradle updating com.google.gms:google-services:4.0.0to com.google.gms:google-services:4.3.3 solved my issue.

查看更多
Root(大扎)
6楼-- · 2020-08-09 05:14

If upgrading all the com.google.firebase libraries doesn't fix the issue, try upgrading the google services plugin dependency at com.google.gms:google-services.

查看更多
乱世女痞
7楼-- · 2020-08-09 05:16

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.

查看更多
登录 后发表回答