Android Can`tools:replace=";安卓:supportsRtl";`使用'tools:ignore=";AllowBackup“`?
如中所述,解决错误如下Android Can`tools:replace=";安卓:supportsRtl";`使用'tools:ignore=";AllowBackup“`?,android,android-manifest,Android,Android Manifest,如中所述,解决错误如下 Error:Execution failed for task ':app:processProductionDebugManifest'. > Manifest merger failed : Attribute application@supportsRtl value=(false) from AndroidManifest.xml:23:9-36 is also present at [com.mylibrarypackage:mylibrary:1.0.
Error:Execution failed for task ':app:processProductionDebugManifest'.
> Manifest merger failed : Attribute application@supportsRtl 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:ignore=“AllowBackup”
,则似乎tools:replace
无效,并且上述错误仍然存在
<application
android:label="@string/app_name"
android:supportsRtl="false"
tools:ignore="AllowBackup"
tools:replace="android:supportsRtl"/>
这是虫子吗?或者我错过了什么?原来这是他们方面的问题,在
I32310f1c4a1e6e8847aa14be34689c5ed406e2a7中修复。我还没有找到实际的提交差异,如果有人知道如何找到这些提交,请发表评论
此外,还报告了以下两个问题:
这两个问题都标记为已解决。我的
标签的最终版本只是替换
的东西,我删除了所有忽略
属性,并通过了构建。我现在在Android Studio中有lint(视觉)警告,但它不会影响构建。Android的问题:allowBackup=“true”
据我所知,我们不能同时使用工具:替换和工具:忽略。因此,您可以从AndroidManifest.xml声明中删除一个。
<application
android:label="@string/app_name"
android:supportsRtl="false"
tools:ignore="AllowBackup"
tools:replace="android:supportsRtl"/>