美文网首页
Android高版本http网络请求失败

Android高版本http网络请求失败

作者: 我就是看看哦 | 来源:发表于2020-03-24 09:36 被阅读0次

根据cordova官网提示 android 8.0 需要添加配置文件Android APK安装限制 打开APK文件进行安装时,以下限制适用: 在Android 8+上,您的应用程序必须具有ACTION_INSTALL_PACKAGE权限。

1、在config.xml文件中,在 <platform name="android"/>节点内添加配置项

<config-file parent="/manifest" target="AndroidManifest.xml" xmlns:android="http://schemas.android.com/apk/res/android">

           <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />

  </config-file>

<edit-config file="AndroidManifest.xml" mode="merge" target="/manifest/application"

            xmlns:android="http://schemas.android.com/apk/res/android">

            <activity android:usesCleartextTraffic="true" />

        </edit-config>

相关文章

网友评论

      本文标题:Android高版本http网络请求失败

      本文链接:https://www.haomeiwen.com/subject/jbjigctx.html