1. 程式人生 > >android9.0適配HTTPS:not permitted by network security policy'

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

tex manifest traffic comm clas 運行 class android and

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"


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