'Execution failed for task ':app:mergeDebugResources'. Android studio

..

I am facing an error as Error:Execution failed for task ':app:mergeDebugResources'.

C:\Users\ankur\AndroidStudioProjects\source1\app\src\main\res\values\public.xml: Error: Found item ###/icon more than one time

I tried to remove the icon mentioned from public.xml but it does not work



Solution 1:[1]

Relocate your project and the build will succeed.

I have done the following changes in a similar issue of mine:

dependencies {
    classpath 'com.android.tools.build:gradle:0.4.3'
}

I have not seen any more mergeDebugResource issues when running my project. Hope this helps!

Note: To stay up to date with Gradle you can change the version number to 0.4.+

Solution 2:[2]

Remove the copy of the items which is present more than one time. you can do it as follows:-

-in android studio go to res>>values>>Strings.xml
-then remove the item which is underlined red(delete a line and then wait for it to refresh )
-then rebuild your project.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 SID --- Choke_de_Code
Solution 2 June7