cordova-plugin-firebase icon indicating copy to clipboard operation
cordova-plugin-firebase copied to clipboard

play-services-measurement-base 17.1.0 vs 17.0.0

Open elliotsabitov opened this issue 5 years ago • 25 comments

Describe the bug After installing cordova-plugin-firebase, I am able to cordova run ios --device but I am not able to cordova run android --device. When I do so, I get the following error:

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.1.0,17.1.0]], but resolves to 17.1.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.

To Reproduce Steps to reproduce the behavior:

  1. cordova plugin add --save cordova-plugin-firebase
  2. cordova run android --device

Expected behavior I would hope that this plugin would work for both android and ios, but it seems like it is failing for cordova-android version 8.0.0.

Plugin Version

"dependencies": {
    "android": "0.0.8",
    "cordova-android": "^8.0.0",
    "cordova-browser": "^6.0.0",
    "cordova-ios": "^5.0.1",
    "cordova-plugin-firebase": "2.0.5",
    "cordova-plugin-inappbrowser": "^3.1.0",
    "cordova-plugin-safariviewcontroller": "^1.6.0",
    "cordova-plugin-splashscreen": "^5.0.3",
    "cordova-plugin-statusbar": "^2.4.3",
    "cordova-plugin-whitelist": "1",
    "phonegap-plugin-barcodescanner": "^8.1.0"
  }

Additional context I was able to resolve this issue and get it to work by following this solution: https://stackoverflow.com/questions/56654226/ionic-cordova-app-stopped-compiling-after-googles-june-17th-firebase-sdk-update

As mentioned by @dpa99c I did the following:

cordova platform rm android
cordova plugin rm cordova-plugin-firebase
cordova plugin add cordova-plugin-firebasex
cordova plugin add cordova-plugin-androidx
cordova plugin add cordova-plugin-androidx-adapter
cordova platform add android

But after doing so, I was not able to get this to work in iOS. Is there a plan to resolve this issue for cordova-android version 8.0.0?

elliotsabitov avatar Aug 26 '19 13:08 elliotsabitov

I'm Facing the same issue

satbir90 avatar Aug 26 '19 16:08 satbir90

Facing same issue as well

tanzanman avatar Aug 28 '19 02:08 tanzanman

Have the same issue

Innercode avatar Aug 28 '19 13:08 Innercode

For those still suffering from this, I recommend using a fork of this repo called cordova-plugin-firebasex It's been working great for me.

Be sure to read the instructions on that page, since there are several changes that need to be made to your app compatible.

pdille avatar Aug 31 '19 02:08 pdille

I am also facing the issue of version conflict in my environment- In android platform Below is my environment. global packages:

@ionic/cli-utils : 1.2.0
Cordova CLI      : 8.1.2 ([email protected])
Ionic CLI        : 3.2.0

local packages:

@ionic/app-scripts        : 3.2.3
@ionic/cli-plugin-cordova : 1.4.1
Cordova Platforms         : android 7.1.4
Ionic Framework           : ionic-angular 3.9.2

System:

Node       : v10.13.0
OS         : Windows 10
Xcode      : not installed
ios-deploy : not installed
ios-sim    : not installed

Please help!!

None of the option is working

orcicareapp avatar Oct 16 '19 14:10 orcicareapp

i have the same issue

Smokolisz avatar Oct 24 '19 17:10 Smokolisz

I have the same error, somebody help us.

SirSaren avatar Nov 05 '19 02:11 SirSaren

I still recommend the newer cordova-plugin-firebasex that I mention above. You should also combine this with the cordova-plugin-androidx-adapter to handle these recent library differences.

EDIT: You should also install the cordova-plugin-androidx plugin (as recommend in the cordova-plugin-androidx-adapter documentation)

After using these plugins, my projects no longer suffer from the issue mentioned in this thread.

Be sure to read the documentation on these plugins!

pdille avatar Nov 05 '19 23:11 pdille

I got this message above:

cordova-plugin-androidx-adapter: Processed 8 Java source files in 192ms (config.widget.plugin || []).forEach is not a function

nelsonota avatar Nov 09 '19 14:11 nelsonota

same issue here. Failed to capture fingerprint of input files for task ':app:preDebugBuild' property 'compileManifests' during up-to-date check.

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.1,17.2.1]], but resolves to 17.2.1. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.

daviseer avatar Nov 30 '19 23:11 daviseer

same problem please advise

moblizeit avatar Dec 03 '19 06:12 moblizeit

Any update on this? I have the same problem

TeodorDimitrov89 avatar Dec 05 '19 12:12 TeodorDimitrov89

x2

Andresxx avatar Dec 09 '19 15:12 Andresxx

How is this STILL an issue?!

dupiesdupreez avatar Dec 27 '19 15:12 dupiesdupreez

same issue here. Failed to capture fingerprint of input files for task ':app:preDebugBuild' property 'compileManifests' during up-to-date check.

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.1,17.2.1]], but resolves to 17.2.1. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.

Same issue here. Does anyone found any solution. Please help.

kurkutesa avatar Jan 06 '20 08:01 kurkutesa

I'm commenting on this, because it was the first place I looked for this error and I may have found the answer on this thread: https://forum.ionicframework.com/t/android-build-falid-the-library-com-google-android-gms-play-services-measurement-base-is-being-requested-by-various-other-libraries/163390/21

which refers to another issue: https://github.com/arnesson/cordova-plugin-firebase/issues/1057

Basically the plugin cordova-plugin-firebase won't work, so it has to be removed, and then instead: ionic cordova plugin add [email protected] --save

DanielBachmann avatar Jan 07 '20 13:01 DanielBachmann

I change the dependencies of the gradle file inside the folder platforms

folder > {project}/platforms/android/cordova-plugin-firebase/{projectname}-build.gradle

// compile 'com.google.firebase:firebase-auth:+' this line compile 'com.google.firebase:firebase-auth:15.1.0'

and in the project properties file inside the folder:

{project}/platforms/android/project.properties

cordova.system.library.2=com.google.android.gms:play-services-tagmanager:15.0.2 cordova.system.library.3=com.google.firebase:firebase-core:15.0.2 cordova.system.library.4=com.google.firebase:firebase-messaging:15.0.2 cordova.system.library.5=com.google.firebase:firebase-config:15.0.2 cordova.system.library.6=com.google.firebase:firebase-perf:15.1.0

I downgrade to that version, but just need to found that is required for your projects

https://mvnrepository.com/artifact/com.google.android.gms/play-services-basement/17.0.0 in that link you can found what is

pbejarano avatar Feb 18 '20 01:02 pbejarano

cordova platform rm android cordova plugin rm cordova-plugin-firebase cordova plugin add cordova-plugin-firebasex cordova plugin add cordova-plugin-androidx cordova plugin add cordova-plugin-androidx-adapter cordova platform add android

Great! It worked for me,

felaray avatar Feb 20 '20 06:02 felaray

cordova platform rm android cordova plugin rm cordova-plugin-firebase cordova plugin add cordova-plugin-firebasex cordova plugin add cordova-plugin-androidx cordova plugin add cordova-plugin-androidx-adapter cordova platform add android

worked for me

vamsi973 avatar Feb 21 '20 15:02 vamsi973

cordova platform rm android cordova plugin rm cordova-plugin-firebase cordova plugin add cordova-plugin-firebasex cordova plugin add cordova-plugin-androidx cordova plugin add cordova-plugin-androidx-adapter cordova platform add android

worked for me

wd810 avatar Feb 26 '20 18:02 wd810

@wangdianyh : i tried above plugin but got new error|:

(node:25393) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, copyfile '/Users/apple/Desktop/klino/klino_user/plugins/cordova-plugin-firebasex/src/android/colors.xml'

kapilSoni101 avatar Mar 03 '20 08:03 kapilSoni101

Use the firebasex plugin

cordova platform rm android cordova plugin rm cordova-plugin-firebase cordova plugin add cordova-plugin-firebasex cordova plugin add cordova-plugin-androidx cordova plugin add cordova-plugin-androidx-adapter cordova platform add android

And use the Sdk version 21

amalichev avatar Mar 13 '20 18:03 amalichev

But I'm not sure if this is the solution for the iOS platforms.

amalichev avatar Mar 13 '20 18:03 amalichev

I faced the same issue and is resolved for my ionic app. I am yet to check for IOS. These are my steps. Removed existing: ionic cordova plugin remove cordova-plugin-firebase npm uninstall @ionic-native/firebase Added new: npm install cordova-plugin-firebasex npm install cordova-plugin-firebase-core -- save npm install [email protected] npm install [email protected]

Thanks, Ganesh

prag008 avatar May 15 '20 03:05 prag008

cordova platform rm android cordova plugin rm cordova-plugin-firebase cordova plugin add cordova-plugin-firebasex cordova plugin add cordova-plugin-androidx cordova plugin add cordova-plugin-androidx-adapter cordova platform add android

worked for me

crddigital avatar Aug 17 '20 22:08 crddigital