图书馆清单中的`android:supportsRtl =“true”`必不可少?它有时会导致错误

图书馆清单中的`android:supportsRtl =“true”`必不可少?它有时会导致错误,第1张

概述当我创建一个Android库时,默认情况下它会在Manifest文件中给我以下内容<applicationandroid:allowBackup="true"android:label="@string/app_name"android:supportsRtl="true"/>在将其作为Bintray上的库发布并被其他人使用之后,只需了解包含此库的应用程序是否在其

当我创建一个Android库时,默认情况下它会在Manifest文件中给我以下内容

<application androID:allowBackup="true"    androID:label="@string/app_name"    androID:supportsRtl="true"/>

在将其作为Bintray上的库发布并被其他人使用之后,只需了解包含此库的应用程序是否在其清单中具有以下内容

    androID:supportsRtl="false"

它将在gradle sync或编译期间发布如下错误.

Error:Execution Failed for task ':app:processproductionDeBUGManifest'.> Manifest merger Failed : Attribute application@supportsRtl value=(false) from AndroIDManifest.xml:23:9-36is 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.

要修复它,我想我需要从我的库Manifest中删除androID:supportsRtl =“true”.

只是想知道为什么AndroID将此默认为库清单?如果我从我的库Manifest中删除androID:supportsRtl =“true”,会不会有任何潜在的问题?

解决方法:

工具:replace =“x,y”

Replace the x, y attributes from any lower priority declaration with
the provIDed value (must be present on the same node).

导入目标SDK低于项目的库时,可能需要显式授予权限(并可能进行其他更改),以使库在以后的运行时中正常运行.这将由清单合并自动执行.

你来了

Manifest merger Failed : Attribute application@supportsRtl
value=(false) from AndroIDManifest.xml:23:9-36

你可以加

tools:replace="androID:supportsRtl"

最后

<application androID:allowBackup="true"androID:label="@string/app_name"androID:supportsRtl="true"tools:replace="androID:supportsRtl"/>
总结

以上是内存溢出为你收集整理的图书馆清单中的`android:supportsRtl =“true”`必不可少?它有时会导致错误全部内容,希望文章能够帮你解决图书馆清单中的`android:supportsRtl =“true”`必不可少?它有时会导致错误所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1097384.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-28
下一篇 2022-05-28

发表评论

登录后才能评论

评论列表(0条)

保存