Attribute application@allowBackup value=(false) from AndroidManifest.xml is also present at [:barcodescanner:] AndroidManifest.xml value=(true)(AndroidManifest.xml 中的属性 application@allowBackup value=(false) 也存在于 [:barcodescanner:] AndroidManifest.xml valu
问题描述
我正在尝试将 ionic 3 应用清单中的 allowBackup 属性设置为 false,但 gradle 抱怨以下错误:
I’m trying to set the allowBackup attribute in my ionic 3 app manifest to false but gradle complains with the following error:
来自 AndroidManifest.xml:4:18-45 的属性 application@allowBackup value=(false) 也存在于 [:barcodescanner:] AndroidManifest.xml:12:9-35 value=(true).建议:添加 'tools:replace="android:allowBackup"'将 AndroidManifest.xml:4:5-11:19 处的元素覆盖.
Attribute application@allowBackup value=(false) from AndroidManifest.xml:4:18-45 is also present at [:barcodescanner:] AndroidManifest.xml:12:9-35 value=(true). Suggestion: add 'tools:replace="android:allowBackup"' to element at AndroidManifest.xml:4:5-11:19 to override.
使用 config.xml 文件中的以下行设置 allowBackup=false
To Set allowBackup=false using below line in config.xml file
<platform name="android"> <edit-config file="AndroidManifest.xml" target="/manifest/application" mode="merge"> <application android:allowBackup="false"/> </edit-config> </platform>
我在我的 ionic 3 应用程序中使用条形码扫描仪.(回购:https://github.com/phonegap/phonegap-plugin-barcodescanner 在 https://ionicframework.com/中推荐docs/native/barcode-scanner/)
I use Barcode Scanner in my ionic 3 app.(Repo: https://github.com/phonegap/phonegap-plugin-barcodescanner recommended in https://ionicframework.com/docs/native/barcode-scanner/)
请帮助我.谢谢!
推荐答案
你必须告诉编译器忽略来自外部库的属性.这样做的方法是在应用程序标签中添加这一行:
You have to tell the compiler to ignore the attribute from the external library. The way to do that is to add this line in application tag:
tools:replace="android:allowBackup"
PS:要访问这些工具,请在顶部的清单标记中添加 xmlns:tools="http://schemas.android.com/tools".
PS: To access the tools add xmlns:tools="http://schemas.android.com/tools" in the manifest tag at the top.
这篇关于AndroidManifest.xml 中的属性 application@allowBackup value=(false) 也存在于 [:barcodescanner:] AndroidManifest.xml value=(true)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:AndroidManifest.xml 中的属性 application@allowBackup value=(false) 也存在于 [:barcodescanner:] AndroidManifest.xml value=(true)


基础教程推荐
- 通过重定向链接在 Google Play 中打开应用 2022-01-01
- AdMob 广告未在模拟器中显示 2022-01-01
- 如何从 logcat 中删除旧数据? 2022-01-01
- Android:getLastKnownLocation(LocationManager.NETWORK_PROVIDER 2022-01-01
- Cocos2d iPhone 非矩形精灵触摸检测 2022-01-01
- iOS4 创建后台定时器 2022-01-01
- libGDX 从精灵或纹理中获取像素颜色 2022-01-01
- NSString intValue 不能用于检索电话号码 2022-01-01
- navigator.geolocation.getCurrentPosition 在 Android 浏览器上 2022-01-01
- iPhone - 获取给定地点/时区的当前日期和时间并将其与同一地点的另一个日期/时间进行比较的正确方法 2022-01-01