1.Android项目代码兼容性设置
添加安全配置文件
<?xml version="1.0" encoding="utf-8"?> <network-security-config> <base-config
cleartextTrafficPermitted="true"> <trust-anchors> <certificates
overridePins="true" src="system" /> <certificates overridePins="true"
src="user" /> </trust-anchors> </base-config> </network-security-config>
//清单文件配置 <application
android:networkSecurityConfig="@xml/network_security_config_debug">
Android开发者会将NetworkConfig按照以下XML文件进行配置
<?xml version="1.0" encoding="utf-8"?> <network-security