【笔记】http访问权限
http访问权限
安卓9.0以后访问http服务器,添加XML文件,并在Manifest.xml中添加networkSecurityConfig选项,指定到xml文件地址,文件内容如下:
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted = "true">
<trust-anchors>
<certificates src ="system"/>
</trust-anchors>
</base-config>
</network-security-config>