Closed therepo90 closed 5 years ago
Its already implemented in google-firebase-plugin
So how to fix it?
how we can solve that error
Just use only google-firebase-plugin or cordova-plugin-firebase-crashlytics :) That's it
how
Your problem is that your plugins have conflicts with each other (two different plugins trying to initialize the same functionality which is crashlytics). Just use one plugin (that manages all the plugins that need to be applied), instead of trying to orchestrate all of it.
Assuming you wanted to use only the google-firebase-plugin
:
package.json
uses the dependency google-firebase-plugin
only. You do this by checking the dependencies
property and the devDependencies
property. You should not find any cordova-plugin-firebase-crashlytics
. If you find any entries, delete that line.npm install
to make sure you have all the dependencies you need.cordova plugin remove cordova-plugin-firebase-crashlytics
to inform cordova you will not be using it anymore. This updates your package.json
too. If this throws an error that you don't have that plugin, then that is good news- there's nothing to remove.plugins
folder, delete the folder named cordova-plugin-firebase-crashlytics
. Otherwise, if that folder was still in your plugins folder, then it will be copied into your platforms/android
project folder.platforms/
and plugins/
folder, then you can also just rm -rf platforms
and rm -rf plugins
which deletes the whole platforms folder. After doing so, re-add your platforms using cordova platform add android
and cordova platform add ios
or whichever platforms you support. By re-adding your platforms, cordova will reproduce the platforms/
and plugins/
folder.Personally, I recommend using the Firebase X plugin instead of the google-firebase-plugin
.
Steps to Reproduce the Problem
cordova build android
Specifications