Suggestion: add 'tools:replace="android:label"'

xiaoxiao2021-02-27  550

Error:Execution failed for task ':xxx:processDebugAndroidTestManifest'. > Manifest merger failed : Attribute application@label value=(@string/app_name) from [debug] AndroidManifest.xml:13:9-50 is also present at [com.xxx:xxx:unspecified] AndroidManifest.xml:15:9-41 value=(@string/app_name). Suggestion: add 'tools:replace="android:label"' to <application> element at manifestMerger5515652802157675786.xml:7:5-9:19 to override.

当多个模块或者 Library 进行依赖的时候,最后 Gradle 的时候所有的 AndroidManifest 会进行合并,若有相同的属性时就会提示上面的错误,如上面的 android:label 属性,建议添加 tools:replace="android:label ,也可以将Module或者Library中无用的属性去除,因为Libarary 最终合并会以release版本,没有debug版本

转载请注明原文地址: https://www.6miu.com/read-1101.html

最新回复(0)