当我创建一个Android库时,默认情况下会在清单文件中给出以下内容。
<application android:allowBackup="true"
android:label="@string/app_name"
android:supportsRtl="true"/>
将其作为库发布在Bintray上并被其他人使用后,只需意识到如果包含此库的应用程序在其清单中具有以下内容
android:supportsRtl="false"
在gradle同步或编译时,它会发布以下错误。
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.
为了解决这个问题,我认为需要从我的库清单中删除 android:supportsRtl="true"
。
不知道为什么Android在其库清单中将此设置为默认值。如果我从库清单中删除 android:supportsRtl="true"
,是否会出现潜在的问题?