【发布时间】:2020-04-16 12:09:44
【问题描述】:
我已经厌倦了在 stackoverflow 中进行谷歌搜索和搜索,但没有一个解决方案对我有用。
我有一个我开发的静态应用程序。现在在 android 中执行,现在在 android 模拟器中,真实设备图像没有从外部 url 加载。
在这方面的任何帮助将不胜感激。
注意: 我已经安装了白名单插件 我的 html 文件中已经有这个下面的元标记
<meta http-equiv="Content-Security-Policy" content="default-src *; style-src * 'unsafe-inline'; script-src * 'unsafe-inline' 'unsafe-eval'; media-src *; img-src * filesystem: data:">
我已添加:
<access origin="*" />
<allow-navigation href="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
在我的 res/xml/config.xml 中
让我知道我还缺少什么,以便显示来自http://website/image.png 的图像
谢谢, 阿山阿里
【问题讨论】:
-
线索:当我将目标 sdkversion 设置为 28 时,图像会损坏,但是当我将其设置为低于 28 时,图像会被加载
标签: android cordova phonegap whitelist