tools:replace="android:icon, android:theme"
来源:互联网 发布:java内存泄露场景 编辑:程序博客网 时间:2024/06/06 03:37
Error:(26, 9) Attribute application@icon value=(@drawable/logo) from AndroidManifest.xml:26:9
Error:(28, 9) Attribute application@theme value=(@style/ThemeActionBar) from AndroidManifest.xml:28:9is also present at XXXX-trunk:XXXXLib:unspecified:15:9 value=(@style/AppTheme)
Suggestion: add 'tools:replace="android:theme"' to <application> element at AndroidManifest.xml:24:5 to override
Error:Execution failed for task ':XXXX:processDebugManifest'.
> Manifest merger failed with multiple errors, see logs
'tools:replace="android:theme"
'tools:replace="android:label"
'tools:replace="android:icon"
原因:
AS的Gradle插件默认会启用Manifest Merger Tool,若Library项目中也定义了与主项目相同的属性(例如默认生成的android:icon和android:theme),则此时会合并失败,并报上面的错误。
解决方法有以下2种:
方法1:在Manifest.xml的application标签下添加tools:replace="android:icon, android:theme"(多个属性用,隔开,并且记住在manifest根标签上加入xmlns:tools="http://schemas.android.com/tools",否则会找不到namespace哦)
方法2:在build.gradle根标签上加上useOldManifestMerger true 这方法有的版本不适用
阅读全文
0 0
- tools:replace="android:icon, android:theme"
- Android Studio Gradle tools:replace="android:icon"错误
- Android Studio uggestion: add 'tools:replace="android:theme" 问题
- Suggestion: add 'tools:replace="android:icon"' to element
- tools:replace="android:icon" 的作用和替代方法
- AndroidStudio出现tools:replace="android:icon"问题
- Studio uggestion: add 'tools:replace="android:theme"
- AndroidStudio出现tools:replace="android:theme"问题
- Suggestion: add 'tools:replace="android:icon"' to <application> element at AndroidManifest.xml
- Suggestion: add 'tools:replace="android:icon"' to <application> element at AndroidManifest.xml
- Suggestion: add 'tools:replace="android:icon"' to <application> element at AndroidManifest.xml
- Suggestion: add 'tools:replace="android:icon"' to <application> element at AndroidManifest.xml
- Suggestion: add 'tools:replace="android:label"'
- AndroidManifest 合并出错 tools:replace="android:allowBackup"
- AndroidManifest 文件合并错误-->tools:replace="android:value"问题
- android:theme="@android:style/Theme.NoTitleBar"
- android:theme="@android:style/Theme.NoTitleBar"
- android:theme="@android:style/Theme.NoDisplay"
- EasyStream系列1之rtsp转rtmp
- itext实现word转pdf,添加水印倾斜铺满全屏,禁止修改和复制
- Partition函数
- 剑指offer--链表中环的入口结点
- photoshop注册机,这个必须留下来
- tools:replace="android:icon, android:theme"
- 《程序员的修炼之道》笔记——4、足够好的软件
- shell 输入/输出重定向
- 进程间通信之消息队列
- 大数据Spark企业级实战版【学习笔记】----Spark速度为何如此快
- QT将信息保存到某个路径下(1)
- C++静态库与动态库
- Quartz 作用
- Android 开发规范