简体   繁体   English

Cordova插件错误:资源被解释为脚本,但以MIME类型的文本/纯文本传输

[英]Cordova plugin error: Resource interpreted as Script but transferred with MIME type text/plain

I'm using Cordova 4 with Cross-walk and on android it throws the 'Resource interpreted as Script but transferred with MIME type text/plain' error for all plugins' javascript files. 我正在将Cordova 4与Cross-walk一起使用,并且在android上,所有插件的javascript文件都会抛出“资源解释为脚本,但以MIME类型文本/纯文本传输”的错误。

I have already added the Whitelist plugin and added the following to my index.html file: 我已经添加了白名单插件,并将以下内容添加到我的index.html文件中:

<meta http-equiv="Content-Type" content="application/javascript; charset=UTF-8">
<meta http-equiv="Content-Security-Policy" content="default-src *; style-src * &apos;unsafe-inline&apos;; script-src * &apos;unsafe-inline&apos; &apos;unsafe-eval&apos;">

and these to the config.xml 这些到config.xml

  <allow-navigation href="*"/>
  <allow-intent href="*"/>

我相信这些不是“真正的”错误,而是特定于Chrome的:请参见此答案

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Chrome错误-资源被解释为脚本,但以MIME类型的文本/纯文本传输 - Chrome Error - Resource interpreted as Script but transferred with MIME type text/plain js警告:资源被解释为脚本,但以MIME类型text / plain传输 - js warning: Resource interpreted as Script but transferred with MIME type text/plain 资源解释为脚本,但使用MIME类型text / plain传输 - 用于本地文件 - Resource interpreted as Script but transferred with MIME type text/plain - for local file ajax错误:资源被解释为脚本,但以MIME类型text / json传输: - ajax error: Resource interpreted as Script but transferred with MIME type text/json: Chrome表示“资源被解释为脚本,但使用MIME类型的文本/纯文本传输。”,不带服务器 - Chrome says “Resource interpreted as script but transferred with MIME type text/plain.”, without server 链接的样式表错误-资源被解释为样式表,但以MIME类型文本/纯文本传输 - Linked Stylesheet Error - Resource interpreted as Stylesheet but transferred with MIME type text/plain 资源被解释为脚本,但以MIME类型text / html javascript传输 - Resource interpreted as Script but transferred with MIME type text/html javascript “资源被解释为脚本,但以MIME类型text / html传输”响应 - 'Resource interpreted as Script but transferred with MIME type text/html' response Rails&Heroku:资源被解释为脚本,但以MIME类型text / html传输 - Rails & Heroku: Resource interpreted as Script but transferred with MIME type text/html 资源被解释为脚本,但在单个站点上以MIME类型text / html传输 - Resource interpreted as Script but transferred with MIME type text/html on individual site
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM