冲突 allowBackup tools:replace

出现的问题: Manifest merger failed : Attribute application@allowBackup value=(false) from AndroidManifest.xml:116:9-36
is also present at [manager:common:unspecified:release] AndroidManifest.xml:12:9-35 value=(true).
Suggestion: add ‘tools:replace=”android:allowBackup”‘ to <application> element at AndroidManifest.xml:114:5-1136:19 to override.

 

 

解决方法:

<manifest xmlns:android=”http://schemas.android.com/apk/res/android”
xmlns:tools=”http://schemas.android.com/tools”
package=”包名”>
在application节点添加

<application tools:replace=”android:allowBackup” ……

同样的还有

tools:replace=”android:icon, android:theme,android:allowBackup”

Share