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"
上一篇:USBCAN的使用和上位机开发(MFC)


下一篇:Django ORM操作的几个细节