我刚开始学习科尔多瓦。我根据remove the empty data container folder, and move the old one to the new one url创建了一个项目。这个项目在Ripple模拟器中运行正常。但是当我尝试在Google Android模拟器中运行它时。它无法获取天气,并显示以下信息:
Refused to connect to 'https://query.yahooapis.com/v1/public/yql?q=select+*+from+weather.forecast+where+location=98052&format=json' because it violates the following Content Security Policy directive: "default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'". Note that 'connect-src' was not explicitly set, so 'default-src' is used as a fallback.
jquery-2.1.4.min.js (4,14349)
我是否应该采取其他措施使此项目在Google Android模拟器中正常运行。
答案 0 :(得分:0)
检查一下:
http://content-security-policy.com/#source_list
修正:
在sorce app目录中:
WWW \ index.html的
in
https://ssl.gstatic.com'unsafe-eval'; style-src'self''unsafe-inline'; media-src *“>
我用'*'改变'self'
content =“default-src *