Android webView 5.0 不允許混合模式降瞳,https中不能加載http的資源
會(huì)報(bào)錯(cuò)
This request has been blocked; the content must be served over HTTPS
解決方案
//解決加載不了http圖片的問題
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP) {
webView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
}
webView.getSettings().setBlockNetworkImage(false);