3

I receive this error:

[cordova]  * What went wrong:
[cordova]  The library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[17.0.0,17.0.0], [17.2.0,17.2.0]], but resolves to 17.2.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.

I install cordova-plugin-firebase plugin and read this instructions:

Google Play Services Your build may fail if you are installing multiple plugins that use Google Play Services. This is caused by the

plugins installing different versions of the Google Play Services library. This can be resolved by installing cordova-android-play-services-gradle-release.

...

My config.xml:

<variable name="PLAY-SERVICES-MEASUREMENT" value="17.2.0" />
<variable name="PLAY-SERVICES-MEASUREMENT-API" value="17.2.0" />
<variable name="PLAY-SERVICES-MEASUREMENT-IMPL" value="17.2.0" />
<variable name="PLAY-SERVICES-MEASUREMENT-SDK" value="17.2.0" />
<variable name="PLAY-SERVICES-MEASUREMENT-SDK-API" value="17.2.0" />

After I removed platform android and add again, but returns same error:

... library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[17.0.0,17.0.0], [17.2.0,17.2.0]]

I'm not sure, but maybe it's the cordova-plugin-googleplus plugin that conflicts with firebase cordova-plugin-googleplus because of google services.

Platforms:

  • cordova: 8.1.2 (cordova-lib: 8.1.1)
  • cordova-android: 7.1.4

Plugins versions:

  • cordova-plugin-firebase: 2.0.5
  • cordova-plugin-googleplus: 8.0.0
  • cordova-android-play-services-gradle-release: 4.0.0

I really don't want to be required to edit the platforms/android/project.properties file (as suggested in most SO answers), because any installation or reinstallation of plugins I would be required to edit again, and if someone else is going to work on the project this would also complicate.

Can you solve this with cordova-android-play-services-gradle-release plugin (or other means) and without editing the platforms/android/project.properties?

Protomen
  • 9,471
  • 9
  • 57
  • 124
  • How where you ablte to install cordova-android-play-services-gradle-release version 4.0.0? If I try that, the plugin keeps telling me min. cordova-android version is 8.0.0. Besides that, I've got the same problem. Maybe you could try to update your cordova-android version? – plocks Sep 05 '19 at 13:52
  • @plocks ok, i will try cordova@9 (minimum for cordova-android@8, I'm almost sure) and cordova-android@8... after test i will return with results. Thanks! – Protomen Sep 05 '19 at 13:54

1 Answers1

1

I also had the same problem for days. I can not adjust the versions. Then today, when I look back to repo's issues page, I saw that some plugin named cordova-plugin-firebasex solves this and more issues.

Maybe you can check it out.

satato
  • 116
  • 1
  • 4
  • Work fine! Thanks. The biggest advantage is that you don't need `cordova-android-play-services-gradle-release` and `cordova-android-firebase-gradle-release` anymore. – Protomen Sep 15 '19 at 19:16
  • keep in mind that you also have to update cordova (>=9) – Asqan Oct 01 '19 at 08:31