Cordova PhoneGap 2.0.0中的下载问题(获取文件传输错误)

Cordova PhoneGap 2.0.0中的下载问题(获取文件传输错误),cordova,phonegap-plugins,Cordova,Phonegap Plugins,我已经从Phonegap 1.5.0升级到2.0.0,面临下载问题 以下是我的下载功能: function download(){ var ecodedurl = "http://finance.yahoo.com/d/quotes.csv?s=^NSEI+^NSEBANK&f=pl1"; var remoteFile = encodeURI(ecodedurl); var localFileName = "temp.txt"; var attachm

我已经从Phonegap 1.5.0升级到2.0.0,面临下载问题

以下是我的下载功能:

function download(){
var ecodedurl = "http://finance.yahoo.com/d/quotes.csv?s=^NSEI+^NSEBANK&f=pl1";
      var remoteFile = encodeURI(ecodedurl);
      var localFileName = "temp.txt";
      var attachmentFileName = localFileName;
      window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function(fileSystem) {
      fileSystem.root.getDirectory("Temp", {create: true, exclusive: false}, function(directoryEntry) {
       directoryEntry.getFile(localFileName, {create: true, exclusive: false}, function(fileEntry) {
        var localPath = fileEntry.fullPath;
       if (device.platform === "Android" && localPath.indexOf("file://") === 0) {
         localPath = localPath.substring(7);
                  }
                       var ft = new FileTransfer();
                     ft.download(remoteFile,
              localPath, function(entry) {
                           attachmentFileEntry = entry;
                 loadFileData(attachmentFileEntry);
                                                                                               }, fail);
                                                                                   }, fail);
                                                            }, fail);
                               }, fail);
      function fail(error) {
          //console.log(error.code);
          //alert("Error occured while downloading the attachment");
          navigator.notification.alert('Error occured while downloading the attachment. Please try again', alertConfirm);
      }

  }

  }

function loadFileData(allText) {
    console.log("loadFileData method:"+allText);
    console.log("allText URL:"+allText.toURL());
    var fileURL = allText.toURL().substring(7);
    console.log("URL:"+fileURL);
    $.ajax({
           type: "GET",
           url: fileURL,
           dataType: "text",
           success: function(data) {
           console.log("file loaded");
           processData(data);}
           });
获取文件传输错误:源URL不在白名单中:^NSEI+^NSEBANK&f=pl1


已尝试在phonegap.xml文件中包含。。。它的作用是:(

如果它是用于IPhone应用程序,您需要编辑Cordova.plist,它在xcode中位于参考资料下。 编辑它(最好是通过xcode xml编辑器-即只需单击它)。 在externalhosts下添加字符串项。
在值上,设置您的站点,或为任何外部站点设置*。

您是否确保遵循了白名单指南: