简体   繁体   English

无法使用Sencha Touch打包用于Android的非常简单的本机应用程序

[英]Failed on using Sencha Touch to package a very simple native app for android

I am learning how to develop app with Sencha Touch. 我正在学习如何使用Sencha Touch开发应用程序。 When I try to package a very simple app to run on android emulator, I failed. 当我尝试打包一个非常简单的应用程序以在android模拟器上运行时,我失败了。 The screen just got stuck on dots keep blinking. 屏幕只是卡在点上而不断闪烁。

All I did is create a new project using Secha CMD, and then replace the content of app.js with the following: 我要做的就是使用Secha CMD创建一个新项目,然后用以下内容替换app.js的内容:

Ext.application({
  name: 'Sencha',

  launch: function() {
    Ext.create("Ext.tab.Panel", {
        fullscreen: true,
        tabBarPosition: 'bottom',

        items: [
            {
                title: 'Home',
                iconCls: 'home',
                html: [
                    '<img src="http://staging.sencha.com/img/sencha.png" />',
                    '<h1>Welcome to Sencha Touch</h1>',
                    "<p>You're creating the Getting Started app. This demonstrates how ",
                    "to use tabs, lists, and forms to create a simple app</p>",
                    '<h2>Sencha Touch</h2>'
                ].join("")
            }
        ]
    });
  }
});

I am using Sencha Cmd v4.0.0.203, ruby 1.9.3p448, windows 8 My app works fine when I test it on my PC using IIS as a web server, no errors. 我正在使用Sencha Cmd v4.0.0.203,ruby 1.9.3p448,Windows 8当我在使用IIS作为Web服务器的PC上对其进行测试时,我的应用程序运行正常。

I found a similar thread here: http://www.sencha.com/forum/showthread.php?238441-App-hangs-at-three-dots-blinking-screen but the solution mentioned in this thread does't work for me. 我在这里找到了类似的线程: http : //www.sencha.com/forum/showthread.php? 238441-App-hangs-at-three-dots-blinking-screen,但是此线程中提到的解决方案不适用于我。

您必须允许在config.xml访问外部域:

<access origin="*"/> 

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM