【发布时间】:2018-07-03 06:21:44
【问题描述】:
我有一个项目,其中我有相同的字符串名称,但基于下面的产品有不同的值
<string name="no_storage" product="nosdcard">Insert SD card before using camera</string>
<string name="no_storage" product="default">Insert SD card before using camera</string>
但是在使用 gradle 构建时,我收到以下错误
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':mergeDebugResources'
Error: Found item String/no_storage more than one time
有没有办法绕过这个检查或解决这个问题?
【问题讨论】:
-
不同的产品是指不同的风格或不同的构建类型?
-
我认为没有
product属性。您应该为不同的构建类型/风格使用不同的资源集
标签: android gradle android-gradle-plugin build.gradle