具体报错信息:
Mixed Content: The page at 'https://XXX.XXX.XXX.XXX/index.jsp#constructDiary/main' was loaded over HTTPS, but requested an insecure image 'cdvfile://localhost/cache-external/1509438606725.jpg'. This request has been blocked; the content must be served over HTTPS.
查了下是类似这个问题:https://segmentfault.com/a/11...
我已经根据cordova手册进行了相应的CSP策略设置,但是还是提示这个报错,图片无法显示。
已解决,在platforms/android/CordovaLib/src/org/apache/cordova/engine/SystemWebViewEngine.java类内
增加
settings.setMixedContentMode(WebSettings.MIXED_CONTENT_COMPATIBILITY_MODE);
混合内容兼容模式设置即可。