Firebase plugins has a conflict (fcm and analytics)
See original GitHub issueInstalling both cordova-plugin-fcm
and cordova-plugin-firebase-analytics
result in an error that does not allow building using cordova.
Cannot add task ‘:processDebugGoogleServices’ as a task with that name already exists.
(x-issue: https://github.com/fechanique/cordova-plugin-fcm/issues/398)
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:25 (1 by maintainers)
Top Results From Across the Web
'Push' and 'Firebase Analytics' plugin conflict
Hello, I'm struggling on building an app that has two native plugins that uses google services. It seems to be some gradle dependency ......
Read more >Firebase Android SDK Release Notes
Service or Product, Gradle dependency, Latest version, Add Analytics? Firebase Android BoM (Bill of Materials), com.google.firebase:firebase-bom.
Read more >Ionic 5 : Can't use FCM Plugin : Google Firebase Cloud ...
I am a very new beginner on Android. I have no control over the configuration of Android files. What is the reason for...
Read more >Release Notes - Play services
Firebase Performance Monitoring Gradle plugin; Firebase Realtime Database; Firebase Remote Config; Firebase installations; Firebase SDK for Google Analytics.
Read more >cordova-plugin-firebase-plus
This plugin is a fork of cordova-plugin-firebase which has been rework to fix ... It brings push notifications, analytics, event tracking, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had a chance to sit down and give this a go myself today. Managed to get the build to compile with minimal changes to the originals!
My steps were:
I modified dev-build.gradle on cordova-support-google-services so it using
google-services:3.0.0
instead of 3.1.0 as suggested above, and then after doingcordova build android --device
then it compiles successfully! So you only need to modify cordova-support-google-services and none of the library versions for firebase.I am also experiencing the same, and also posted this under Issue #51.
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 the 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.
Any guidance you can offer would be extremely helpful.
Thank you!