[英]Execution failed for task ':app:mergeDebugResources'. Android studio
.. ..
I am facing an error as Error:Execution failed for task ':app:mergeDebugResources'.我面临一个错误,因为错误:任务':app:mergeDebugResources'的执行失败。
C:\Users\ankur\AndroidStudioProjects\source1\app\src\main\res\values\public.xml: Error: Found item ###/icon more than one time
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我试图从 public.xml 中删除提到的图标,但它不起作用
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.运行我的项目时,我没有看到更多的 mergeDebugResource 问题。 Hope this helps!
希望这可以帮助!
Note : To stay up to date with Gradle you can change the version number to 0.4.+注意:要与 Gradle 保持同步,您可以将版本号更改为 0.4。+
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.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.