okhttp3 访问服务器失败 onFailure 提示CLEARTEXT communication to host not permitted by network
解决方法!!!这真的是一个坑
在res下新建一个xml目录 创建名为network_security_config.xml 文件 ,该文件内容如下:
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted...
原创
2018-07-28 01:21:15 ·
8062 阅读 ·
8 评论