I created an App using Cordova, then followed the instructions to prepare the App to integrate with the Firebase plugin:
cordova-plugin-firebase
. 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 can not function without it.
Searched Location:
/myAppCordova2/platforms/android/app/src/nullnull/debug/google-services.json /myAppCordova2/platforms/android/app/src/debug/nullnull/google-services.json /myAppCordova2/platforms/android/app/src/nullnull/google-services.json /myAppCordova2/platforms/android/app/src/debug/google-services.json
/myAppCordova2/platforms/android/app/src/nullnullDebug/google-services.json /myAppCordova2/platforms/android/app/google-services.json
Solution proposed here in OS: copy google-services.json
to /platforms/android/app/
directory, 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 have tried several solutions proposed here in the OS and none solved my problem, could anyone help me?