webview出现图片加载异常 Mixed Content: The page at 'https
2018-03-26 15:59
501 查看
webview加载https时会出现图片无法加载状态,根据日志查看,发现加载的url会先加载http,然后再加载https,
因为谷歌在Android5.0开始默认关闭混合模式,https中不能加载http资源所以在Android5.0及以上要手动开启混合模式if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
mywebview.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
}
因为谷歌在Android5.0开始默认关闭混合模式,https中不能加载http资源所以在Android5.0及以上要手动开启混合模式if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
mywebview.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
}
相关文章推荐
- Android - WebView 加载 Https 出现 SSL Error. Failed to validate the certificate chain
- webview 加载https出现的问题
- WebView加载https的空白及图片加载不了的问题
- webView加载 https 的网页,不显示图片.md
- android 5.0之后原生webview同时用https和http加载HTML不加载图片解决方案
- Android webview加载https网页时图片无法加载显示问题
- Android webview 使用HTTPS时有的图片不能加载
- Android ScrollView 嵌套 WebView,WebView无法加载图片,出现空白区域
- webview加载https地址图片显示不出来问题
- webview加载https页面图片不能显示问题
- sdwebImageview 在https 中不能加载图片时解决方法
- Android webview 使用HTTPS时有的图片不能加载
- android 基于HTTPSWebview无法正常加载图片
- WebView加载网页时出现“Sorry,you browser seems not to support the HTML 5 canvas element ”
- 解决Webview加载不了https请求中的http图片
- Android webview加载https网页时http图片无法显示
- android 5.0之后原生webview同时用https和http加载HTML不加载图片解决方案
- WebView中删除JS中confirm框上的The page at "file".....
- android 5.0之后原生webview同时用https和http加载HTML不加载图片解决方案
- Android 7.0 WebView加载https出现空白页