如何将config.xml中的权限声明为AndroidManifest.xml?
我在config.xml中声明了权限,但在phonegap构建编译后,AndroidManifest.xml为空。 它不在编译日志中列出。 我应该如何修改config.xml my config.xml中关于权限声明的代码:如何将config.xml中的权限声明为AndroidManifest.xml?,android,permissions,android-manifest,phonegap,api-versioning,Android,Permissions,Android Manifest,Phonegap,Api Versioning,我在config.xml中声明了权限,但在phonegap构建编译后,AndroidManifest.xml为空。 它不在编译日志中列出。 我应该如何修改config.xml my config.xml中关于权限声明的代码: <platform name="android"> <preference name="android-minSdkVersion" value="19"/> <preference name="android-t
<platform name="android">
<preference name="android-minSdkVersion" value="19"/>
<preference name="android-targetSdkVersion" value="28" />
<config-file parent="/manifest" target="AndroidManifest.xml" xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.INTERNET" />
</config-file>
<edit-config file="AndroidManifest.xml" mode="merge" target="/manifest/application" xmlns:android="http://schemas.android.com/apk/res/android">
<application android:usesCleartextTraffic="true"
android:networkSecurityConfig="xml/network_security_config.xml" />
<uses-library android:name="org.apache.http.legacy" android:required="false"/>
</edit-config>
</platform>
你好,请检查我的代码 步骤1:将此代码放入AndroidManifest.xml中
<application
android:networkSecurityConfig="@xml/network_security_config"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true">
步骤2网络安全配置xml创建res\xml\network\u security\u config.xml
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">cart.demoproject.info</domain> //put your domain name
<domain includeSubdomains="true">82.90.247.111</domain>// put your domain ip address
</domain-config>
</network-security-config>
cart.demoproject.info//输入您的域名
82.90.247.111//put您的域ip地址
你好,请检查我的代码
步骤1:将此代码放入AndroidManifest.xml中
<application
android:networkSecurityConfig="@xml/network_security_config"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true">
步骤2网络安全配置xml创建res\xml\network\u security\u config.xml
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">cart.demoproject.info</domain> //put your domain name
<domain includeSubdomains="true">82.90.247.111</domain>// put your domain ip address
</domain-config>
</network-security-config>
cart.demoproject.info//输入您的域名
82.90.247.111//put您的域ip地址