使用android 10的手机发现无法连接,提示因为:net::ERR_CLEARTEXT_NOT_PERMITTED
从Android 9.0(API级别28)开始,默认情况下禁用明文支持。因此http的url均无法在webview中加载
需要在manifest 中application节点添加
android:usesCleartextTraffic="true"
或者将http改为https也是可以打开网页的
使用android 10的手机发现无法连接,提示因为:net::ERR_CLEARTEXT_NOT_PERMITTED
从Android 9.0(API级别28)开始,默认情况下禁用明文支持。因此http的url均无法在webview中加载
需要在manifest 中application节点添加
android:usesCleartextTraffic="true"
或者将http改为https也是可以打开网页的