-
3 Dec 2012 8:23 AM #71
Try to require every ST element that you use in your app.
* Note that the requires must be out of the "launch" function.
Code:Code:Ext.application({ name:'MyApp', models:['User','Group'], stores:['Users'], controllers:['Users'], views:['Main','ShowUser'], requires: [ 'MyApp.view.LogoImage', 'MyApp.view.LinkButton', 'Ext.form.Panel', 'Ext.field.Text', 'Ext.field.Password', 'Ext.Button', 'Ext.Img', 'Ext.Label' ], launch:function(){Ext.create('MyApp.view.Main');} });
Cheers!
-
3 Dec 2012 11:17 PM #72
I managed to get it running by adding the corresponding requires to each of my 'views'.
A way for me to debug this was that I added each view in the app.js one by one. If the app ran, then that meant my view was okay. Then I added another view. If the app didn't boot up, I would check the view and add the require for whichever component I was using in it.
Hope this helps
-
4 Dec 2012 10:58 PM #73
I met the same issue, but Sencha Dev didn't get out answser? it seems that a waiting game. hope somebody give out the solution. thanks
-
5 Dec 2012 12:29 AM #74
I can provide more information that
ST2.1 + cordova 2.2 can work on android simulator 4.0.1
but ST2.1 + cordova 2.2 it Can Not work on android real device 4.0.1.met the blank screen. why? what's the difference?
-
5 Dec 2012 4:36 AM #75Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,582
- Vote Rating
- 433
- Answers
- 3102
For ST 2.1.1, we are looking at stripping out the Ext.device.* classes from the all builds
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
5 Dec 2012 6:59 AM #76
I'd like to know that when will the ST2.1.1 release? and will fixed this problem?
-
8 Dec 2012 12:33 AM #77
Thanks to mhousser's file "sencha-touch-all.js" and riyaad "index.html" indications now white screen was removed and my apps are working. Just waiting for the official sencha team fix.
Code:<!DOCTYPE HTML> <html manifest="" lang="en-US"> <head> <meta charset="UTF-8"> <title>App Name</title> <!-- <script id="microloader" type="text/javascript" src="touch/microloader/development.js"></script> --> <!-- add resources --> <link href="resources/css/app.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="touch/sencha-touch-all.js"></script> <script type="text/javascript" src="app.js"></script> </head> <body> <div id="appLoadingIndicator"> <div></div> <div></div> <div></div> </div> </body> </html>
-
13 Dec 2012 9:21 PM #78
Once you have update the index.html and how do you package your code to native? used sencha CMD to generate native app?
actually I have used your solution to use sencha CMD generate native code successfully, the native app can run on andriod 4.0.3 simulator.but Can NOT run on 4.03 real device. it's white screen as well. how do you think that?
-
13 Dec 2012 11:59 PM #79
Hi @koala2012,
for Android my recipe is:
1. Use mhousser's file "sencha-touch-all.js" and riyaad "index.html" indications.
2. My "app.json" looks like
3. execute "sencha app build production"Code:... "js": [ { //"path": "touch/sencha-touch.js" "path": "touch/sencha-touch-all.js" }, { "path": "app.js", "bundle": true, /* Indicates that all class dependencies are concatenated into this file when build */ //"update": "delta" "update": "full" } ... ],
4. then copy the files from "build/APP_NAME/production/*" to my "PHONEGAP_PROJEC/android/assets/www/"
5. cd "PHONEGAP_PROJECT/android/"
6. execute "ant release"
7. cd "PHONEGAP_PROJECT/android/bin"
8. jarsigner -verbose -keystore PATH_TO_KEY_STORE -signedjar APP_NAME.apk "APP_NAME-unsigned.apk" KEY_STORE
9. zipalign -v 4 APP_NAME.apk APP_NAME-aligned.apk
10. open andriod 4.0.3 simulator
11. adb install -r APP_NAME_aligned.apk ( now white screen was removed and app is OK in sumulator )
12. Install the app to my GT-I9100 with Android 4.0.3 ( now white screen was removed and app is OK in real device)
To build for Apple Store just:
1. Open with Xcode the phonegap project, just "add files to project" and load folder "build/APP_NAME/production", rename the folder from "production" to "www"
2. Execute run, the iphone simulator is opened, now white screen was removed and app is OK.
Hope this helps
-
5 Jan 2013 10:20 AM #80
Thanks !
Thanks !
Thanks again for the thead, it FINALLY works, I went crazy for a day.
So to summarize very quick :- Download the modified "sencha_touch_all" file from mhousser message put it in the 'touch' directory of your app, it will override the existing one ( you may want to save it)
- Modify your index.html to get rid of the microloader code like riyaad and osmen2 found out : Code:
<!DOCTYPE HTML><html manifest="" lang="en-US"> <head> <meta charset="UTF-8"> <title>App Name</title> <!-- <script id="microloader" type="text/javascript" src="touch/microloader/development.js"></script> --> <!-- add resources --> <link href="resources/css/app.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="touch/sencha-touch-all.js"></script> <script type="text/javascript" src="app.js"></script> </head> <body> <div id="appLoadingIndicator"> <div></div> <div></div> <div></div> </div> </body> </html> - Modify your app.json like osmen2 said to make sure it uses the sencha-touch-all.js, because by default it uses the sencha-touch.jsCode:
... "js": [ { "path": "cordova-2.2.0.js" }, { //"path": "touch/sencha-touch.js" "path": "touch/sencha-touch-all.js" }, { "path": "app.js", "bundle": true, /* Indicates that all class dependencies are concatenated into this file when build */ //"update": "delta" "update": "full" } ... ], - Build you app with "sencha app build production" or "sencha app build package"
- Copy the files from "build/APP_NAME/production/*" to my "PHONEGAP_PROJEC/android/assets/www/"
- Refresh your www folder in your eclipse project and it should run !


Reply With Quote