Android :Manifest merger failed : Attribute application@allowBackup value=(false) from AndroidManifest.xml:24:9-36 is also present at [com.wobiancao:imagenice9lib:1.0.1] AndroidManifest.xml:10:9-35 value=(true).
添加依赖报错。
解决方法:
在AndroidManifest.xml中加入xmlns:tools="http://schemas.android.com/tools
<manifest package="你的包名"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
然后在application节点添加:
参考:
<application
android:name=".common.你的Application"
android:allowBackup="false"
tools:replace="android:allowBackup"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:networkSecurityConfig="@xml/network_security_config"
android:roundIcon="@mipmap/ic_launcher"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true"
tools:targetApi="n">
<application
tools:replace="android:allowBackup">
若超过一个可以这样写:
<application
tools:replace="android:icon,android:allowBackup">
错误场景相关案例:
仿Nice首页图片列表9图样式,并实现拖拽效果
https://github.com/wobiancao/ImageNice9Layout
阿里巴巴推出的一个RecyclerView得扩展库vlayout