Error:Attribute application@icon value=(@drawable/ic_launcher) 报错的解决方法
来源:互联网 发布:python 方括号 编辑:程序博客网 时间:2024/05/21 04:40
今天在导入一个emoji的控件的时候提示Error:(14, 9) Attribute application@icon value=(@drawable/ic_launcher) from AndroidManifest.xml:14:9
百度了一下,这是一个编译的常见错误,主要是AS的Gradle插件默认会启用Manifest Merger Tool,若Library项目中也定义了与主项目相同的属性(例如默认生成的android:icon和android:theme),则此时会合并失败,并报上面的错误。
可惜看的那篇文章的解决方法讲的不清不楚,依然没有搞懂要怎么弄,于是找到另一篇文章中有完整的代码,一目了然。
注意修改的地方在于第2行的
xmlns:tools="http://schemas.android.com/tools"
和application最后一行的
tools:replace="android:icon, android:theme"
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="com.leo.kang.demo" android:versionCode="1" android:versionName="1.0"> <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="18" /> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" tools:replace="android:icon, android:theme">
1 0
- Error:Attribute application@icon value=(@drawable/ic_launcher) 报错的解决方法
- 解决:AndroidStudio导入第三方工程出现Error:Attribute application@icon value=(@mipmap/ic_launcher)
- Android新建项目报错android:icon="@drawable/ic_launcher"
- Manifest merger failed : Attribute application@icon value=(@mipmap/ic_launcher) from AndroidManifest
- Android Studio编译错误:Attribute application@icon value=(@drawable/logo) from AndroidManifest.xml:26:9
- Android Studio中使用android:src="@drawable/ic_launcher"报错
- Error:No resource found that matches the given name (at 'icon' with value '@mipmap/ic_launcher.9').
- Attribute application@allowBackup value=(true) from AndroidManifest.xml 报错
- IIS的Server Application Error报错解决方法
- IIS的Server Application Error报错解决方法
- 问题: Manifest merger failed : Attribute application@allowBackup value=(false) 解决方法
- MySQL表中存Emoji报错Error 1366: Incorrect string value的解决方法
- 关于Fatal error: Can't use function return value in write context报错的解决方法!
- 使用@mipmap/ic_launcher编译报错解决方案
- Manifest merger failed : Attribute application@label value=(@string/app_name)
- Tomcat报错Control character in cookie value or attribute.
- DedeCMS Error: (PHP 5.3 and above) Please set 'request_order' ini value to i报错解决方法
- log4j:ERROR Could not find value for key log4j.appender.Console 报错解决方法
- Appium基于安卓的各种FindElement的控件定位方法实践和建议
- Android性能调优
- java二叉树的遍历算法
- app 性能测试--弱网
- wxPython写计算器
- Error:Attribute application@icon value=(@drawable/ic_launcher) 报错的解决方法
- Haskell之Yesod开发–简单网站开发(一)
- Convert Sorted List to Binary Search Tree
- Haskell之Yesod开发–简单网站开发(二)
- Android—Greendao:SQLite Exception: no such table Error [duplicate]
- 1 微信企业号、订阅号、服务号之间有什么区别
- 浮点数的表示 问题
- TI低功耗蓝牙(BLE)介绍
- StoryBoard不使用AutoLayout情况下 按比例快速兼容适配iPhone6/6 Plus教程