0
I created an App using Cordova, then followed the instructions to prepare the App to integrate with the Firebase plugin:
- I created the Keystore (needed to integrate with Firebase).
- Then I created the application project in Firebase and informed the hash stored in the Keystore.
- Then I installed the plugin
cordova-plugin-firebase
. - And copy the google-services.json file to the project root folder.
After following the plugin and Firebase documentation, I came across this error:
:app:processDebugGoogleServices FAILED
FAILURE: Build failed with an Exception.
* What Went Wrong: Execution failed for task ':app:processDebugGoogleServices'. > File google-services.json is Missing. The Google Services Plugin cannot Function without it.
Searched Location:
/myAppCordova2/Platforms/android/app/src/null/debug/google-services.json /myAppCordova2/Platforms/android/app/src/debug/null/google-services.json /myAppCordova2/Platforms/android/app/src/null/google-services.json /myAppCordova2/Platforms/android/app/src/debug/google-services.json
/myAppCordova2/Platforms/android/app/src/nullDebug/google-services.json /myAppCordova2/Platforms/android/app/google-services.json
Solution proposed here in the OS: copy the google-services.json
to the directory /platforms/android/app/
, but this generated another error:
:app:mergeDebugResources FAILED
FAILURE: Build failed with an Exception.
- What Went Wrong: Execution failed for task ':app:mergeDebugResources'.
[string/google_app_id] /myAppCordova2/Platforms/android/app/src/main/res/values/strings.xml
[string/google_app_id] /myAppCordova2/Platforms/android/app/build/generated/res/google-services/debug/values/values.xml: Error: Duplicate Resources [string/google_api_key] /myAppCordova2/Platforms/android/app/src/main/res/values/strings.xml [string/google_api_key] /myAppCordova2/Platforms/android/app/build/generated/res/google-services/debug/values/values.xml: Error: Duplicate Resources
PS: I’ve tried several solutions proposed here in the OS and none solved my problem, anyone could help me?