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

来源:互联网 发布:flypro软件 编辑:程序博客网 时间:2024/06/05 18:26
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版本

4 0
原创粉丝点击