解决:AndroidStudio导入第三方工程出现Error:Attribute application@icon value=(@mipmap/ic_launcher)
2015-11-18 17:25
531 查看
问题描述:
这里不仅限于icon这一项,可能会出现其它的属性冲突错误。问题出现的原因是本工程的属性和第三方工程里的属性名称相同,AS在编译的时候未做区分,导致合并失败。
解决方法:
在Mainfest文件头加:xmlns:tools="http://schemas.android.com/tools"
例如:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.anthony.test">
在application头里添加:
tools:replace="android:icon, android:theme"
例如:
<application
android:name="com.anthony.test.CustomApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme"
tools:replace="android:icon, android:theme" >
相关文章推荐
- [Android] EditText 的 inputType属性
- Universal-Image-Loader 使用
- 一路走来 Android NDK 踩过的坑
- android中常见的Drawable资源有哪些?
- AndroidAnnotations简单示例
- Android Context完全解析,你所不知道的Context的各种细节
- android中之断点续传
- Android自定义手势识别
- 【Android学习笔记】Broadcast receiver
- android进行录音功能并保存播放
- Android控件之Service AIDL实现机制demo
- Android 如果布局中有ScrollView和Fragment或者带有滚动条的布局进行嵌套,布局加载完成页面无法定位到顶部的情况
- WINDOWS7环境下android studio、NDK配置补充
- Android过渡动画之进入退出
- 关于图片加载优化的小技巧
- android在java代码中动态添加组件及相关布局方法(LayoutParams)
- Android中的Service的用法 开启服务,下一篇讲绑定服务
- Android 音效流程分析
- Android开发之Android Material Design Toolbar自定义随笔
- Android Service小记