簡體   English   中英

Cordova插件錯誤:資源被解釋為腳本,但以MIME類型的文本/純文本傳輸

[英]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 * &apos;unsafe-inline&apos;; script-src * &apos;unsafe-inline&apos; &apos;unsafe-eval&apos;">

這些到config.xml

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

我相信這些不是“真正的”錯誤,而是特定於Chrome的:請參見此答案

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM