javaandroidandroid-studioandroid-studio-import

Android studio get error "Execution failed for task ':app:mergeDebugResources'. Error Duplicate resources"


After converting an eclipse project into android studio I am getting below error:

Error:Execution failed for task ':app:mergeDebugResources'.
> [string/test] E:\Workspace\Calculators\app\src\main\res\values\strings_sizing.xml
  [string/test] E:\Workspace\Calculators\app\src\main\res\values\strings_conversion.xml: Error: Duplicate resources 

How can I resolve this error in Android Studio?


Solution

  • This error is telling you that you have the same string resource defined in 2 different files. The entry

    <string name="test">...</string>
    

    exists in both

    (Note that I simulated this scenario in my Android Studio environment and the build produced the exact same error message that you have posted.)