3
,張貼在https://stackoverflow.com/a/39178185/3286489,解決了如下錯誤可以`工具:替換=「android:supportsRtl」`配合使用`tools:ignore =「AllowBackup」`?
Error:Execution failed for task ':app:processProductionDebugManifest'.
> Manifest merger failed : Attribute [email protected] value=(false) from AndroidManifest.xml:23:9-36
is also present at [com.mylibrarypackage:mylibrary:1.0.0] AndroidManifest.xml:14:9-35 value=(true).
Suggestion: add 'tools:replace="android:supportsRtl"' to <application> element at AndroidManifest.xml:18:5-67:19 to override.
我們可以使用下面添加tools:replace="android:supportsRtl"
。
<application
android:label="@string/app_name"
android:supportsRtl="false"
tools:replace="android:supportsRtl"/>
This Works。
但是,如果我們在應用程序標記中有tools:ignore="AllowBackup"
,好像tools:replace
沒有效果,並且上述錯誤仍然存在。
<application
android:label="@string/app_name"
android:supportsRtl="false"
tools:ignore="AllowBackup"
tools:replace="android:supportsRtl"/>
這是一個錯誤?或者我想念什麼?
問題'android:allowBackup =「true」' –
據我所知,我們不能同時使用'tools:replace'和'tools:ignore'。所以你可以從你的AndroidManifest.xml聲明中刪除一個。 –