Ad

Compilation Error When Adding Dependency: Com.google.firebase:firebase-core

I'm trying to modify the Cordova plugin Phonegap Plugin Push plugin to include FirebaseAnalytics. To do so, I added firebase-core as a dependency in plugin.xml:

<framework src="com.google.firebase:firebase-core:16.0.8"/>

If I add this plugin to a new project (no other plugins installed) and try to compile, I get the error:

Failed to notify dependency resolution listener.
> The library com.google.android.gms:play-services-basement is being requested by various other libraries at [[15.0.1,15.0.1]], but resolves to 16.2.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 [[16.0.0,16.0.0]], but resolves to 17.0.3. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.

I don't know where does this conflict come from. I tried to search for play-services-basement and firebase-iid in the project, but there were no matches. I didn't see them in the gradle dependency list either.

How can I fix this? What's the best way to find where does this conflict come from?

Ad

Answer

I was able to fix this by updating the version of "com.google.firebase:firebase-messaging:" to 17.5.0, I was using 17.0.0

Ad
source: stackoverflow.com
Ad