add 'tools:replace="android:allowBackup"' to <application>報錯

報錯內容:

Error:Execution failed for task ':DaPingGuo:processdapinguoManifest'.

> Manifest merger failed : Attribute application@allowBackup value=(false) from AndroidManifest.xml:46:9-36
is also present at [com.dadada.analysis:dadadaio:3.2.1] AndroidManifest.xml:16:9-35 value=(true).

Suggestion: add 'tools:replace="android:allowBackup"' to <application> element at AndroidManifest.xml:44:5-576:19 to override.

一般會在引入第三方jar包的時候出現衝突~

根據建議只要添即可解決:

原代碼

    <application
        android:name="com.dapingguo.application.MyApplication"
        android:allowBackup="false"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppBaseTheme">

根據修改意見添加以下代碼:

tools:replace="android:allowBackup"
 <application
        android:name="com.dapingguo.application.MyApplication"
        android:allowBackup="false"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppBaseTheme"
        tools:replace="android:allowBackup">
成功!!!


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章