Reputation: 1750
FAILURE: Build failed with an exception.
[string/google_app_id] /home/yushin/Desktop/b/TopStreetZambia/platforms/android/app/src/main/res/values/strings.xml [string/google_app_id] /home/yushin/Desktop/b/TopStreetZambia/platforms/android/app/build/generated/res/google-services/debug/values/values.xml: Error: Duplicate resources [string/google_api_key] /home/yushin/Desktop/b/TopStreetZambia/platforms/android/app/src/main/res/values/strings.xml [string/google_api_key] /home/yushin/Desktop/b/TopStreetZambia/platforms/android/app/build/generated/res/google-services/debug/values/values.xml: Error: Duplicate resources
Upvotes: 1
Views: 1311
Reputation: 1475
I solved it by just renaming google_api_key
to google_map_api_key
just go to strings.xml
and place the cursor at the google_api_key
and press shift+f6
to refactor it to the name you want
Upvotes: 2
Reputation: 1750
it appear they was a duplication in google_app_id and google_app_key they belonged to two files one generated from google services, so what i did was went to android.json file and looked up
"res/values/strings.xml": {
"parents": {
"/resources": [
{
"xml": "<string name=\"google_app_id\">@string/google_app_id</string>",
"count": 1
},
{
"xml": "<string name=\"google_api_key\">@string/google_api_key</string>",
"count": 1
},
....
]
and removed
{
"xml": "<string name=\"google_app_id\">@string/google_app_id</string>",
"count": 1
},
{
"xml": "<string name=\"google_api_key\">@string/google_api_key</string>",
"count": 1
}
that fixed the issue for me.
Upvotes: 3