Manifest merger failed with multiple errors 依赖项目时的错误.

来源:互联网 发布:蚁群算法的基本思想 编辑:程序博客网 时间:2024/06/05 17:41

先上图.

介绍下背景: 项目需要新增音视频播放的功能,对比了下准备用哔哩哔哩的开源框架.github有人封装了下,地址: https://github.com/CarGuo/GSYVideoPlayer

于是引入该项目.然后出现这个问题.



stackOverflow上有答案,于是搬过来.

原文链接:http://stackoverflow.com/questions/24506800/android-studio-gradle-icon-error-manifest-merger/24507129#24507129

大概意思就是说,这个清单文件合并冲突是gradle的一个缺陷.解决方式是:在清单文件的根标签上加行

xmlns:tools="http://schemas.android.com/tools"
然后在application 的节点上(注意不是节点里面,是在节点标签上)加行

tools:replace="android:icon,android:theme"

贴上代码

<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android"          xmlns:tools="http://schemas.android.com/tools"          package="com.xxx.xxx"    >

<application    android:name=".application.MyApplication"    android:allowBackup="true"    android:icon="@mipmap/ic_launcher"    android:label="@string/app_name"    android:supportsRtl="true"    android:theme="@style/AppTheme"    tools:replace="android:icon,android:theme">






0 0
原创粉丝点击