Android Studio常见问题 -- AndroidManifest.xml 覆盖问题
问题如下
D:\source-code\AndroidStudio\MyApplication\app\src\main\AndroidManifest.xml
Error:(14, 9) Attribute application@icon value=(@drawable/ic_launcher) from AndroidManifest.xml:14:9
Error:(14, 9) Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute application@icon value=(@drawable/ic_launcher) from AndroidManifest.xml:14:9
is also present at MyApplication:library:unspecified:18:9 value=(@drawable/icon)
Suggestion: add 'tools:replace="android:icon"' to <application> element at AndroidManifest.xml:12:5 to override
解决方法
在app的AndroidManifest.xml中做如下修改:
<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. 在manifest节点加上:xmlns:tools="http://schemas.android.com/tools"
2. 在application 节点加上:tools:replace="android:icon, android:theme"
Reference
http://tools.android.com/tech-docs/new-build-system/user-guide/manifest-merger
Android Studio常见问题 -- AndroidManifest.xml 覆盖问题的更多相关文章
- Android Studio 学习 - AndroidManifest.xml文件学习
首先,今天发现了一个很牛逼的教程网站:慕课网(http://www.imooc.com/).有很多大牛发布的教学视频.值得收藏.学习. 今天主要参照陈启超老大的视频,学习了多个Activity之间的切 ...
- Android Studio常见问题 -- uses-sdk:minSdkVersion 8 cannot be smaller than version 9 declared in library
问题描述 * What went wrong:Execution failed for task ':app:processDebugManifest'.> Manifest merger fa ...
- Android Studio 常见问题汇总
一.字体大小问题 在android studio的使用过程中没有发现类似于Eclipse中的font选项,调节字体大小方法如下: 1.File---- >Settings,找到Editor 2. ...
- Android APP 读取 AndroidManifest.xml 中的版本信息详解
APP都会涉及到版本的问题,Android APP的版本信息保存在AndroidManifest.xml文件的顶部.如下图: 有2个属性表示,“android:versionCode”和“androi ...
- Android之读取 AndroidManifest.xml 中的数据
转:http://www.2cto.com/kf/201208/151123.html 下来示例如何读取这些数据. 1 版本信息.应用名称 2 Appliction 的Meta-data 3 Acti ...
- Android Studio 常见问题及解决方法
一.Error:All flavors must now belong to a named flavor dimension 问题描述: Error:All flavors must now bel ...
- Android 基础 一 AndroidManifest.xml
一.概述 AndroidManifest.xml是Android应用的入口文件,它描述了package中暴露的组件(activities, services, 等等),他们各自的实现类,各种能被处理的 ...
- Android Studio 打开activity_main.xml不能正常显示
操作系统:Windows 10 x64 IDE:Android Studio 3.2.1 解决方法:http://www.jcodecraeer.com/a/anzhuokaifa/Android_S ...
- Android之读取 AndroidManifest.xml 中的数据:版本号、应用名称、自定义K-V数据(meta-data)
AndroidManifest.xml中的定义如下: <manifest xmlns:android="http://schemas.android.com/apk/res/andro ...
随机推荐
- IE11无法支持Forms认证,,,也就是无法保存COOKIE
<authentication mode="Forms"> <forms name="xxxx" loginUrl="login.a ...
- Zero_qiqi DIV模式的省市区三级联动
1].[代码] [HTML]代码 跳至 [1] [2] [3] [4] [5] [6] ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 ...
- ASP.NET MVC3 Dynamically added form fields model binding
Adding new Item to a list of items, inline is a very nice feature you can provide to your user. Thi ...
- Codeforces 735C:Tennis Championship(数学+贪心)
http://codeforces.com/problemset/problem/735/C 题意:有n个人打锦标赛,淘汰赛制度,即一个人和另一个人打,输的一方出局.问这n个人里面冠军最多能赢多少场, ...
- C#:文件、文件夹特别操作
1.过滤特殊字符 public class CharService:IDisposable { private List<char> _invalidChars; public CharS ...
- js作用域链与this
this的绑定与function和对象的定义位置无关,是由函数调用时的执行环境所决定的. scope chain是由函数定义时的位置决定的与函数调用时的执行环境无关.
- js比typeof更准确的验证类型方法
var type = function (o){ var s = Object.prototype.toString.call(o); return s.match(/\[object (.*?)\] ...
- bootstrap 列表 表格 表单 复选 单选 多选 输入框组
一.列表 ul li 二.表格 table (http://www.runoob.com/bootstrap/bootstrap-tables.html) 1. 基本表格 <table cla ...
- [C++][代码库]Vector3空间向量类
本文用C++实现一个简单的Vector3类的功能,暂时有的功能是: 1 + - * /算术运算 2 向量的数量积,又叫:点乘 3 向量的向量积,又叫:叉乘 4 向量单位化(normalization) ...
- 最流行的编程语言JavaScript能做什么?
本文转自互联网! 首先很遗憾的一点是,"PHP虽然是最好的语言",但是它不是最流行的语言. 对不起的还有刚刚在4月TIOBE编程语言排行榜上榜的各个语言: 你们都很棒,但是你们都担 ...