0

I have dependencies issue when running my app in android.

I have the following error :

* What went wrong:
Could not determine the dependencies of task ':react-native-firebase:compileDebugAidl'.
> Failed to notify dependency resolution listener.
   > The library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[17.2.0,17.2.0]], but resolves to 16.5.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
   > The library com.google.firebase:firebase-iid is being requested by various other libraries at [[20.0.0,20.0.0]], but resolves to 18.0.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.

I am used to resolve theses conflicts. I usually use ./gradlew :app:dependencies to find the faulty package (usually a sub-dependency), go to https://mvnrepository.com/ to find which version match the sub-package, and force to load the correct version.

But not this time, because I have no reference to play-services-measurement-base:16.5.0 or com.google.firebase:firebase-iid:18.0.0 in the dependency tree. (Btw, the command :app:dependencies works while compile trigger the error above).

All I did is changing :

firebaseVersion = "17.3.3"

to

firebaseVersion = "+"

in android/build.gradle

There is the gradle :app:dependencies results :

https://pastebin.com/6QD10hEs

Do someone can tell me what happen here?

Why gradle :app:dependencies don't show me the correct dependency tree?

thanks

  • It seems to be a duplicate of https://stackoverflow.com/questions/50577437/com-google-android-gmsplay-services-measurement-base-is-being-requested-by-vari – Ekans Aug 29 '19 at 12:05
  • Not really, excluding `com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true`. But I don't want to disable version check. I have a lot of react modules (24), so I want to fix it properly. For that, I need to have the correct dependency tree. My main question is : why `gradle :app:dependencies` don't show me the conflicted package. – coolmic Aug 29 '19 at 12:48
  • Did you read the [accepted answer](https://stackoverflow.com/a/50584461/2182582)? – Ekans Aug 29 '19 at 13:17
  • I already tried to to get new version, but I still have dependence to old packages. – coolmic Aug 29 '19 at 14:01
  • I check react-native-firebase, and it seems compileOnly is the culprit. – coolmic Aug 29 '19 at 14:02

0 Answers0