Sencha touch 2 Sencha Touch中的Ajax请求在桌面上工作,但在平板电脑上部署时不工作?

Sencha touch 2 Sencha Touch中的Ajax请求在桌面上工作,但在平板电脑上部署时不工作?,sencha-touch-2,Sencha Touch 2,我在SenchaTouch中有一个视图,其中我正在使用使用Ajax请求的外部html文件。视图代码如下所示: Ext.define('Appname.view.Viewname', { extend: 'Ext.Container', xtype: 'viewname', initialize : function () { this.callParent(); Ext.Ajax.request({ url : 'resources

我在SenchaTouch中有一个视图,其中我正在使用使用Ajax请求的外部html文件。视图代码如下所示:

 Ext.define('Appname.view.Viewname', {
    extend: 'Ext.Container',
    xtype: 'viewname',

initialize : function () {

    this.callParent();

    Ext.Ajax.request({
        url     : 'resources/hello.html',
        params  : {
            id : 1
        },
        scope   : this,
        success : function (response) {
            var text = response.responseText;
            this.setHtml(text);
        }
    })
    rotate();
}



});

我正在尝试在我的viewname视图中加载hello.html。当我在浏览器中运行应用程序时,它工作正常。只要我使用cordova将其部署到平板电脑上,它就不会显示任何内容。原因是什么???

如果部署在android设备上,请检查eclipse项目hello.html中的“assets/www/resources”文件夹中是否存在。如果没有,请复制它,然后尝试为您的android设备创建apk…

是的。我已经检查过了。hello.html位于资源文件夹中。