Yushin
Yushin

Reputation: 1750

Ionic Build Execution failed for task ':app:mergeDebugResources'

FAILURE: Build failed with an exception.

Upvotes: 1

Views: 1311

Answers (2)

Mohammed Fathi
Mohammed Fathi

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

Yushin
Yushin

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

Related Questions