1.
Android CLEARTEXT communication to www.baidu.com not permitted by network security policy
报错原因:
Android P限制了非加密的流量请求导致出现 not permitted by network security policy
如何解决:
1.把所有的http请求全部改为https请求
2.在res的xml目录(),然后创建一个名为:network_config.xml文件,具体内容网上都有
3.在manifest的application标签中添加 android:usesCleartextTraffic=“true”
RxJava+RxAndroid+Retrofit+OkHttp网络请求
最新推荐文章于 2022-08-24 09:10:33 发布
