android9.0适配HTTPS:not permitted by network security policy'

app功能接口正常,其他手机运行OK,但是在Android9.0的手机上报错

CLEARTEXT communication to 192.168.1.xx not permitted by network security policy'

无法加载数据

原因是因为android9.0开始必须https,和iOS10一样的规定。

解决办法如下,在manifest.xml的application节点下:

android:usesCleartextTraffic="true"

 


 

posted @ 2019-04-19 12:21  Sharley  阅读(1214)  评论(0编辑  收藏  举报