Cleartext HTTP traffic to ... not permitted
Android下APP出现java.io.IOException: Cleartext HTTP traffic to dict.youdao.com not permitted,百度查了一下是Android高版本后限制了HTTP访问权限,如何解决?
<?xml version="1.0" encoding="utf-8"?> <network-security-config> <base-config cleartextTrafficPermitted="true" /> </network-security-config>
<application ... android:networkSecurityConfig="@xml/network_security_config" ... />