[英]Cordova Plugin-File Android Q Permissions Error
So Android 10 broke Cordovas plugin file as it gives permission errors relating to this change: https://developer.android.com/training/data-storage#scoped-storage因此,Android 10 破坏了 Cordovas 插件文件,因为它给出了与此更改相关的权限错误: https : //developer.android.com/training/data-storage#scoped-storage
I came across this possible solution https://github.com/bumptech/glide/issues/3896 but Cordova does not seem to support it.我遇到了这个可能的解决方案https://github.com/bumptech/glide/issues/3896但 Cordova 似乎不支持它。
The following config.xml produces an error以下 config.xml 产生错误
<?xml version='1.0' encoding='utf-8'?>
<widget id="io.cordova.hellocordova" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>HelloCordova</name>
<description>
A sample Apache Cordova application that responds to the deviceready event.
</description>
<author email="dev@cordova.apache.org" href="http://cordova.io">
Apache Cordova Team
</author>
<content src="index.html" />
<plugin name="cordova-plugin-whitelist" spec="1" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<edit-config file="AndroidManifest.xml" mode="merge" target="/manifest/application">
<application android:allowBackup="false" />
<application android:fullBackupContent="false" />
<application android:requestLegacyExternalStorage="true" />
</edit-config>
<platform name="android">
<allow-intent href="market:*" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
</platform>
<engine name="android" spec="^8.1.0" />
</widget>
../debug/AndroidManifest.xml:22: AAPT: error: attribute android:requestLegacyExternalStorage not found.
My Android studio shows the latest sdks being used.我的 Android 工作室显示了正在使用的最新 sdk。
检查build.gradle
文件中的以下build.gradle
行
project.ext {defaultBuildToolsVersion=29 defaultMinSdkVersion=19 defaultTargetSdkVersion=29 defaultCompileSdkVersion=29}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.