正如张贴在https://stackoverflow.com/a/39178185/3286489 https://stackoverflow.com/a/39178185/3286489,解决如下错误
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:replace="android:supportsRtl"
如下。
<application
android:label="@string/app_name"
android:supportsRtl="false"
tools:replace="android:supportsRtl"/>
这有效。
但是如果我们有tools:ignore="AllowBackup"
在应用程序标签中,看起来像tools:replace
没有效果,并且上述错误仍然存在。
<application
android:label="@string/app_name"
android:supportsRtl="false"
tools:ignore="AllowBackup"
tools:replace="android:supportsRtl"/>
这是一个错误吗?或者我错过了什么?
事实证明这是他们这边的问题,已解决I32310f1c4a1e6e8847aa14be34689c5ed406e2a7
。我还没有找到实际的提交差异,如果有人知道如何找到这些提交,请发表评论。
另外还报告了以下两个问题:
- https://code.google.com/p/android/issues/detail?id=193679 https://code.google.com/p/android/issues/detail?id=193679
- https://code.google.com/p/android/issues/detail?id=205956 https://code.google.com/p/android/issues/detail?id=205956
这两个问题都标记为已解决。我的最终版本<application>
标签只是replace
东西,我全部删除了ignore
属性和构建已通过。我现在在 Android Studio 中出现了 lint(视觉)警告,但它并不影响构建。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)