在安卓 android9.0开始 默认chrome已经不支持明文http
现在互联网各浏览器也慢慢地采用https的强制性要求
所以打开http会有429或503等等奇怪的错误
那么webview想支持明文http,要以下设置
androidmainfest.xml中的application添加属性
android:usesCleartextTraffic="true"
或者
targetSdkVersion改为27或以下
如此就可以愉快地玩了
在安卓 android9.0开始 默认chrome已经不支持明文http
现在互联网各浏览器也慢慢地采用https的强制性要求
所以打开http会有429或503等等奇怪的错误
那么webview想支持明文http,要以下设置
androidmainfest.xml中的application添加属性
android:usesCleartextTraffic="true"
或者
targetSdkVersion改为27或以下
如此就可以愉快地玩了