Skip to content
This repository has been archived by the owner on Jul 1, 2020. It is now read-only.

Dependency conflict #1

Closed
ghost opened this issue Nov 7, 2017 · 6 comments
Closed

Dependency conflict #1

ghost opened this issue Nov 7, 2017 · 6 comments

Comments

@ghost
Copy link

ghost commented Nov 7, 2017

When I run:
cordova build android
I get the following:
What went wrong: A problem occurred configuring root project android. Cannot add task :processDebugGoogleServices' as a task with that name already exists.

I am attempting to use Firebase Analytics (cordova-plugin-firebase-analytics) which requires your plugin, Google Services (cordova-support-google-services). I am also using Firebase Cloud Messaging (cordova-plugin-fcm). The cordova-plugin-fcm includes Google Services 3.0.0 and the cordova-support-google-services has Google Services at 3.1.0 creating the conflict.

I am new to using Ionic 3/Angular 4. A fix I had found on a different forum, and implemented, was changing the version in platforms/android/cordova-support-google-services to 3.0.0 from 3.1.0. This was only a temporary fix, and a Sr. Dev on my team said this was terrible and should never be done. Of course, I do not want to do something that is a bad practice, however, what this error informed me of is that if I can get the dependencies at the same version, then the conflict resolves and the project builds.

Do you have an earlier plugin that has Google Services at 3.0.0 or is there a way to specify the version of Google Services at the time of installation? Any guidance you can offer would be extremely helpful.

Thank you!

@phonic
Copy link

phonic commented Nov 27, 2017

Look for any "firebase-core:11.0.x" entry in platform/android/project.properties and build.gralde and change it to "firebase-core:11.0.1"

In addition:
Make sure your android build tools are up to date

run "gradlew assembleDebug --info" from your platforms/android/ directory to see any further specific error.

@macdonst
Copy link

@HeatherWolford I think you'd need to send a PR to the maintainer of cordova-plugin-fcm to use this plugin to run the Google Services gradle task.

@chemerisuk
Copy link
Owner

@macdonst does it make sense to create a PR to https://github.com/phonegap/phonegap-plugin-push, to use this repo as a dependency? Should solve some conflicts that people might have. Or there are some plans to integrate google services task into cordova-android?

@macdonst
Copy link

@chemerisuk yeah, I'd be cool with a PR to the push plugin. It should make things more consistent if we only have one plugin adding this step.

@macdonst
Copy link

macdonst commented Apr 9, 2018

I sent a PR to cordova-plugin-fcm but I'm not sure if the plugin is even maintained anymore.

@chemerisuk
Copy link
Owner

The conflict will be fixed after merging of fechanique/cordova-plugin-fcm#495

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants