Android sencha touch未捕获类型错误:无法读取属性';isReady';未定义的sencha touch all.js:21
我试图在我的设备或Android模拟器上运行我的应用程序,但收到以下错误消息:Android sencha touch未捕获类型错误:无法读取属性';isReady';未定义的sencha touch all.js:21,android,sencha-touch,touch,sencha-touch-2,Android,Sencha Touch,Touch,Sencha Touch 2,我试图在我的设备或Android模拟器上运行我的应用程序,但收到以下错误消息: Uncaught TypeError: Cannot read property 'isReady' of undefined sencha-touch-all.js:21 index.html <!DOCTYPE html> <html> <head> <title>Sencha Touch Demo 2</title> <link
Uncaught TypeError: Cannot read property 'isReady' of undefined sencha-touch-all.js:21
index.html
<!DOCTYPE html>
<html>
<head>
<title>Sencha Touch Demo 2</title>
<link rel="stylesheet" type="text/css" href="./touch2/resources/css-debug/sencha-touch.css">
<script type="text/javascript" charset="utf-8" src="cordova-2.2.0.js"></script>
<script type="text/javascript" src="./touch2/sencha-touch-all.js"></script>
<script type="text/javascript" src="myapp.js"></script>
</head>
</html>
我能做什么?请提供帮助。您是否考虑过使用sencha打包的应用程序运行该应用程序 我首先在浏览器上进行所有测试,然后构建一个打包的构建 (“Sencha应用程序构建包”位于命令行上) 这两种方法之间的主要区别在于,您没有使用Ext.Loader动态加载资源。据我所知,没有任何移动环境可以使用加载器,因此,如果您想静态引用index.html中的每个应用程序文件,那么它也应该可以工作。我可能错了,但这句话有些道理 再加上更好的一切,让您的生产应用程序都缩小和包装好 希望这有帮助
Ext.require([ 'Ext.MessageBox' ]);
Ext.require([ 'Ext.Label' ]);
Ext.Loader.setConfig({
enabled: true
});
Ext.application({
name: 'touch-demo',
controllers: [
'Main'
],
models: [
'contato'
],
stores: [
'contatos',
'remotecontatos'
],
views: [
'contatoslist',
'ContatosForm',
'remoteListContato'
],
viewport: {
layout: {
type: 'card',
animation: {
type: 'slide',
duration: 1000
}
}
},
launch: function(){
}
});