Android Build Error - [string/google_app_id] - Duplicate Resource
See original GitHub issueHi, using cordova 7.0.1 android 6.2.3
Android build failed message
Execution failed for task ':mergeDebugResources'.
[string/google_app_id] .../platforms/android/res/values/strings.xml
[string/google_app_id] .../platforms/android/build/generated/res/google-services/debug/values/values.xml: Error: Duplicate resources
- Removed the google_app_id from platforms/android/res/values/strings.xml
- Same problem
- Removed the google_app_id from platforms/android/build/generated/res/google-services/debug/values/values.xml
- Same problem
- Removed google_app_id from both files
- Same problem
Any idea?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:9 (2 by maintainers)
Top Results From Across the Web
"Duplicate Resources" error when building Android app
The reason you are seeing this error is because Android considers the following images to be the same, based on how they are...
Read more >[Android] Error: Duplicate resources · Issue #22234 - GitHub
Here is the error I'm getting while generating the release build ... Error: Duplicate resources * Try: Run with --stacktrace option to get...
Read more >Android Studio throws error: “Duplicate resources”
It seems like you have the same image resource in two files OR you added an additional, non-required file to the res folder....
Read more >Configure build variants | Android Developers
Build variants are the result of Gradle using a specific set of rules to combine settings, code, and resources configured in your build...
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 Free
Top 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
I am experiencing the same issue, same versions. Also using
phonegap-plugin-push
.Edit: I’ve tried removing the Android platform, also tried removing and installing this plugin and
phonegap-plugin-push
in different orders.I was eventually able to get
phonegap build
to run, by deleting the following from android.json:…along with the corresponding entry in strings.xml, but I honestly don’t know what side effects that will have and it seems like a very hacky solution at best.
This is a trash from a some other plugin. It will be ok, because this constant value is generated from your ‘google-services.json’ now