编译faild - 任务执行失败':app:mergeReleaseResources - 重复资源

时间:2016-05-05 07:31:07

标签: android android-studio gradle

我在尝试在android studio中运行我的应用程序时收到此错误。 所有"重复"资源存在于不同的布局文件夹中(每个文件夹的大小不同)。

Error:Execution failed for task ':app:mergeReleaseResources'.
> [layout-ldrtl-hdpi-v17/coachmark_dashboard2] C:\Users\USER\Mobile-Android\app\src\main\res\layout-ldrtl-hdpi\coachmark_dashboard2.xml [layout-ldrtl-hdpi-v17/coachmark_dashboard2] C:\Users\USER\Mobile-Android\app\src\main\res\layout-ldrtl-hdpi-v17\coachmark_dashboard2.xml: Error: Duplicate resources
[layout-ldrtl-v17/coachmark_dashboard3] C:\Users\USER\Mobile-Android\app\src\main\res\layout-ldrtl\coachmark_dashboard3.xml [layout-ldrtl-v17/coachmark_dashboard3] C:\Users\USER\Mobile-Android\app\src\main\res\layout-ldrtl-v17\coachmark_dashboard3.xml: Error: Duplicate resources
[layout-ldrtl-v17/coachmark_dashboard4] C:\Users\USER\Mobile-Android\app\src\main\res\layout-ldrtl\coachmark_dashboard4.xml [layout-ldrtl-v17/coachmark_dashboard4] C:\Users\USER\Mobile-Android\app\src\main\res\layout-ldrtl-v17\coachmark_dashboard4.xml: Error: Duplicate resources
[layout-ldrtl-v17/coachmark_dashboard1] C:\Users\USER\Mobile-Android\app\src\main\res\layout-ldrtl\coachmark_dashboard1.xml [layout-ldrtl-v17/coachmark_dashboard1] C:\Users\USER\Mobile-Android\app\src\main\res\layout-ldrtl-v17\coachmark_dashboard1.xml: Error: Duplicate resources
[layout-ldrtl-v17/coachmark_dashboard2] C:\Users\USER\Mobile-Android\app\src\main\res\layout-ldrtl\coachmark_dashboard2.xml [layout-ldrtl-v17/coachmark_dashboard2] C:\Users\USER\Mobile-Android\app\src\main\res\layout-ldrtl-v17\coachmark_dashboard2.xml: Error: Duplicate resources
[layout-ldrtl-v17/coachmark_feed2] C:\Users\USER\Mobile-Android\app\src\main\res\layout-ldrtl\coachmark_feed2.xml   [layout-ldrtl-v17/coachmark_feed2] C:\Users\USER\Mobile-Android\app\src\main\res\layout-ldrtl-v17\coachmark_feed2.xml: Error: Duplicate resources
[layout-ldrtl-v17/coachmark_feed1] C:\Users\USER\Mobile-Android\app\src\main\res\layout-ldrtl\coachmark_feed1.xml   [layout-ldrtl-v17/coachmark_feed1] C:\Users\USER\Mobile-Android\app\src\main\res\layout-ldrtl-v17\coachmark_feed1.xml: Error: Duplicate resources
[layout-ldrtl-v17/coachmark_feed3] C:\Users\USER\Mobile-Android\app\src\main\res\layout-ldrtl\coachmark_feed3.xml   [layout-ldrtl-v17/coachmark_feed3] C:\Users\USER\Mobile-Android\app\src\main\res\layout-ldrtl-v17\coachmark_feed3.xml: Error: Duplicate resources
[layout-ldrtl-v17/coachmark_select_university] C:\Users\USER\Mobile-Android\app\src\main\res\layout-ldrtl\coachmark_select_university.xml   [layout-ldrtl-v17/coachmark_select_university] C:\Users\USER\Mobile-Android\app\src\main\res\layout-ldrtl-v17\coachmark_select_university.xml: Error: Duplicate resources
[layout-ldrtl-v17/coachmark_dashboard_box] C:\Users\USER\Mobile-Android\app\src\main\res\layout-ldrtl\coachmark_dashboard_box.xml   [layout-ldrtl-v17/coachmark_dashboard_box] C:\Users\USER\Mobile-Android\app\src\main\res\layout-ldrtl-v17\coachmark_dashboard_box.xml: Error: Duplicate resources

1 个答案:

答案 0 :(得分:0)

layout-ldrtl文件夹出现问题。 在我的情况下,我把它改为layout-heb(希伯来语),这项工作对我来说很有用。