Open HuarenYu opened 8 years ago
Android webview 从Lollipop开始webview默认不允许混合模式,https当中不能加载http资源,需要设置开启。
Mixed content using HTTP and HTTPS on WebViews are disabled by default starting Lollipop. Is possible that is not working on devices with Lollipop? If this is the case, you can change the default WebView setting on Lollipop using:
webSettings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW); Documentation here: http://developer.android.com/reference/android/webkit/WebSettings.html#setMixedContentMode(int)
great !
Thanks for your information.
试了,没什么卵用。
对阿,我也尝试了,并不能解决我的问题。 可以访问一下,这个h5页面,看看能否正常加载图片资源;(平安银行页面) https://bank-static.pingan.com.cn/ca/index.html?channel=WX&onlineSQFlag=N&sign=d7e229a5-8aae-4213-84e1-86e731a2a965224f0a2dd77a9dc76662bcef7a589bd2&cardCatenaNo=01a02a03a04a05a06a07&versionNo=R10310&scc=230000945&isDisplayRecommend=N
Android webview 从Lollipop开始webview默认不允许混合模式,https当中不能加载http资源,需要设置开启。
Mixed content using HTTP and HTTPS on WebViews are disabled by default starting Lollipop. Is possible that is not working on devices with Lollipop? If this is the case, you can change the default WebView setting on Lollipop using:
webSettings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW); Documentation here: http://developer.android.com/reference/android/webkit/WebSettings.html#setMixedContentMode(int)