![](/img/trans.png)
[英]Chrome Error - Resource interpreted as Script but transferred with MIME type text/plain
[英]Cordova plugin error: Resource interpreted as Script but transferred with MIME type text/plain
我正在将Cordova 4与Cross-walk一起使用,并且在android上,所有插件的javascript文件都会抛出“资源解释为脚本,但以MIME类型文本/纯文本传输”的错误。
我已经添加了白名单插件,并将以下内容添加到我的index.html文件中:
<meta http-equiv="Content-Type" content="application/javascript; charset=UTF-8">
<meta http-equiv="Content-Security-Policy" content="default-src *; style-src * 'unsafe-inline'; script-src * 'unsafe-inline' 'unsafe-eval'">
这些到config.xml
<allow-navigation href="*"/>
<allow-intent href="*"/>
我相信这些不是“真正的”错误,而是特定于Chrome的:请参见此答案
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.