arnesson / cordova-plugin-firebase

Cordova plugin for Google Firebase
http://arnesson.github.io/cordova-plugin-firebase
MIT License
1.01k stars 1.56k forks source link

play-services-measurement-base 17.1.0 vs 17.0.0 #1103

Open elliotsabitov opened 5 years ago

elliotsabitov commented 5 years ago

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?

satbir90 commented 5 years ago

I'm Facing the same issue

tanzanman commented 5 years ago

Facing same issue as well

Innercode commented 5 years ago

Have the same issue

pdille commented 5 years ago

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.

orcicareapp commented 5 years ago

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 (cordova-lib@8.1.1)
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

Smokolisz commented 5 years ago

i have the same issue

SirSaren commented 5 years ago

I have the same error, somebody help us.

pdille commented 5 years ago

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!

nelsonota commented 5 years ago

I got this message above:

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

daviseer commented 4 years ago

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.

moblizeit commented 4 years ago

same problem please advise

TeodorDimitrov89 commented 4 years ago

Any update on this? I have the same problem

Andresxx commented 4 years ago

x2

dupiesdupreez commented 4 years ago

How is this STILL an issue?!

kurkutesa commented 4 years ago

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.

DanielBachmann commented 4 years ago

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 cordova-plugin-firebase-lib@3.3.0 --save

pbejarano commented 4 years ago

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

felaray commented 4 years ago

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,

vamsi973 commented 4 years ago

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 commented 4 years ago

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

kapilSoni101 commented 4 years ago

@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'

amalichev commented 4 years ago

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 commented 4 years ago

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

prag008 commented 4 years ago

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 cordova-plugin-androidx@1.0.2 npm install cordova-plugin-androidx-adapter@1.0.2

Thanks, Ganesh

crddigital commented 4 years ago

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