问题如下

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 覆盖问题的更多相关文章

  1. Android Studio 学习 - AndroidManifest.xml文件学习

    首先,今天发现了一个很牛逼的教程网站:慕课网(http://www.imooc.com/).有很多大牛发布的教学视频.值得收藏.学习. 今天主要参照陈启超老大的视频,学习了多个Activity之间的切 ...

  2. 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 ...

  3. Android Studio 常见问题汇总

    一.字体大小问题 在android studio的使用过程中没有发现类似于Eclipse中的font选项,调节字体大小方法如下: 1.File---- >Settings,找到Editor 2. ...

  4. Android APP 读取 AndroidManifest.xml 中的版本信息详解

    APP都会涉及到版本的问题,Android APP的版本信息保存在AndroidManifest.xml文件的顶部.如下图: 有2个属性表示,“android:versionCode”和“androi ...

  5. Android之读取 AndroidManifest.xml 中的数据

    转:http://www.2cto.com/kf/201208/151123.html 下来示例如何读取这些数据. 1 版本信息.应用名称 2 Appliction 的Meta-data 3 Acti ...

  6. Android Studio 常见问题及解决方法

    一.Error:All flavors must now belong to a named flavor dimension 问题描述: Error:All flavors must now bel ...

  7. Android 基础 一 AndroidManifest.xml

    一.概述 AndroidManifest.xml是Android应用的入口文件,它描述了package中暴露的组件(activities, services, 等等),他们各自的实现类,各种能被处理的 ...

  8. Android Studio 打开activity_main.xml不能正常显示

    操作系统:Windows 10 x64 IDE:Android Studio 3.2.1 解决方法:http://www.jcodecraeer.com/a/anzhuokaifa/Android_S ...

  9. Android之读取 AndroidManifest.xml 中的数据:版本号、应用名称、自定义K-V数据(meta-data)

    AndroidManifest.xml中的定义如下: <manifest xmlns:android="http://schemas.android.com/apk/res/andro ...

随机推荐

  1. webApi FileReader

    https://developer.mozilla.org/en-US/docs/Web/API/FileReader https://github.com/node-file-api/FileRea ...

  2. JVM 指令集

    指令码 助记符 说明 0x00 nop 什么都不做 0x01 aconst_null 将null推送至栈顶 0x02 iconst_m1 将int型-1推送至栈顶 0x03 iconst_0 将int ...

  3. [转]Windows配置Git

    原文地址:http://blog.csdn.net/exlsunshine/article/details/18939329 1.从git官网下载windows版本的git:http://git-sc ...

  4. 将helps.php或者functions.php直接进行了加载

    TP3系列中functions.php文件默认其实是空文件,很好找.我们可以直接封装代码. Laravel5系列中的path/vendor/laravel/framework/src/Illumina ...

  5. 9、Http回顾/Servlet

    1 Http回顾 Http协议: 1)http协议: 对浏览器客户端和服务器端之间数据传输的格式规范. 2)http请求:浏览器->服务器端 格式: 请求行(请求方式(GET/POST) 请求资 ...

  6. 6、XML(2)

    1 总结XML基础 XML基础 1)XML的作用 1.1 作为软件配置文件 1.2 作为小型的"数据库" 2)XML语法(由w3c组织规定的) 标签: 标签名不能以数字开头,中间不 ...

  7. MFC中的CDC,CClientDC,CPaintDC,CWindowDC的区别

    转自 http://blog.csdn.net/guoquan2003/article/details/4534716 CDC是Windows绘图设备的基类. CClientDC:(1)(客户区设备上 ...

  8. 多校赛3- Painter 分类: 比赛 2015-07-29 19:58 3人阅读 评论(0) 收藏

    D - Painter Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status P ...

  9. 分页sql存储过程算法

    /****** Object: StoredProcedure [dbo].[PRO_Pub_FenYe] Script Date: 08/04/2014 11:14:22 ******/ SET A ...

  10. 水流雨渍shader

    战神斯巴达之魂的雨渍做的很逼真,尝试了下,似乎是差不多了,整体欠缺不少 普通平面: 环形流动: 河流: shader实现,3层加上一个偏移层 圆形的雨渍流动和河流要重新展一下UV