HTTP FAILED: java.net.UnknownServiceException: CLEARTEXT communication to 172.29.1.233 not permit...

HTTP FAILED: java.net.UnknownServiceException: CLEARTEXT communication to 172.29.1.233 not permitted by network security policy
Q:高版本Android默认禁止Http请求,放开方式:
①在res/xml文件夹下创建network_security_config.xml文件,内容如下:



    

②在AndroidManifest.xmlapplication节点添加如下内容:

 android:networkSecurityConfig="@xml/network_security_config"
image.png

你可能感兴趣的:(HTTP FAILED: java.net.UnknownServiceException: CLEARTEXT communication to 172.29.1.233 not permit...)