<network-security-config>
<base-config cleartextTrafficPermitted="true"/>
<!-- Trust user added CAs while debuggable only -->
<debug-overrides>
<trust-anchors>
<!--信任用户安装的证书-->
<certificates src="user" />
<certificates src="system" overridePins="true" />
</trust-anchors>
</debug-overrides>
</network-security-config>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.xxx.x">
<application
android:name=".MainApp"
android:allowBackup="true"
android:anyDensity="true"
android:hardwareAccelerated="true"
android:icon="@drawable/app_launch_icon"
android:label="${label_name}"
android:largeHeap="true"
android:networkSecurityConfig="@xml/network_security_config"
manifest中引用network_security_config