-
9 Oct 2012 2:43 PM #1
Answered: Phonegap/Cordova get stuck on the loading page
Answered: Phonegap/Cordova get stuck on the loading page
Hi,
I've made a blank new app with the sencha command tools, it works on my computer
But when I put the app in Phonegap/Cordova, on the phone the app is stuck on the loading page.
I've tried a ST2 App without microloader script found on the Internet and it works, so is there a bug in the microloader ?
PS : I use cordova-2.1.0
-
Best Answer Posted by ludm
I've found the solution here :
http://stackoverflow.com/questions/1...phonegap-issue
You have to add at the top of app.js this code :
Ext.Loader.setConfig({ enabled: true, disableCaching: false });
-
11 Oct 2012 4:15 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,118
- Vote Rating
- 453
- Answers
- 3160
You need to use a remote debugger to see if there are any errors being thrown. Most of the time it is due to a class not properly required before the build and therefor it's trying to load it but it does not exist, if this is the case then you need to require the class so the build will pick it up.
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.
-
11 Oct 2012 5:19 AM #3
Thank you for your answer, but you mean Java Classes or Sencha Classes ?
I have used LogCat and get the following message :
I solved it by addingcall to OpenGL ES API with no current contextin the Android Manifest,android:hardwareAccelerated="true"
But I am still stuck on the loading page
-
11 Oct 2012 5:35 AM #4
Here is the logcat :
10-11 15:30:30.395: V/webview(2189): singleCursorHandlerTouchEvent -getEditableSupport FASLE
10-11 15:30:30.730: D/CordovaWebView(2189): >>> loadUrl(file:///android_asset/www/production/index.html)
10-11 15:30:30.740: D/CordovaWebView(2189): >>> loadUrlNow()
10-11 15:30:30.790: W/System.err(2189): java.net.SocketException: Socket closed
10-11 15:30:30.790: W/System.err(2189): at libcore.io.Posix.accept(Native Method)
10-11 15:30:30.790: W/System.err(2189): at libcore.io.BlockGuardOs.accept(BlockGuardOs.java:55)
10-11 15:30:30.790: W/System.err(2189): at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:98)
10-11 15:30:30.790: W/System.err(2189): at java.net.ServerSocket.implAccept(ServerSocket.java:202)
10-11 15:30:30.790: W/System.err(2189): at java.net.ServerSocket.accept(ServerSocket.java:127)
10-11 15:30:30.790: W/System.err(2189): at org.apache.cordova.CallbackServer.run(CallbackServer.java:195)
10-11 15:30:30.795: W/System.err(2189): at java.lang.Thread.run(Thread.java:856)
10-11 15:30:30.805: D/DroidGap(2189): onMessage(onPageStarted,file:///android_asset/www/production/index.html)
10-11 15:30:30.975: D/chromium(2189): Unknown chromium error: -6
10-11 15:30:30.975: I/GATE(2189): <GATE-M>DEV_ACTION_COMPLETED</GATE-M>
10-11 15:30:30.985: D/Cordova(2189): onPageFinished(file:///android_asset/www/production/index.html)
10-11 15:30:30.985: D/CordovaWebView(2189): >>> loadUrlNow()
10-11 15:30:30.990: D/DroidGap(2189): onMessage(onNativeReady,null)
10-11 15:30:30.990: D/DroidGap(2189): onMessage(onPageFinished,file:///android_asset/www/production/index.html)
10-11 15:30:31.050: D/DroidGap(2189): onMessage(spinner,stop)
10-11 15:31:00.465: D/DroidGap(2189): Paused the application!
10-11 15:31:00.465: D/CordovaWebView(2189): Handle the pause
10-11 15:31:00.465: D/CordovaWebView(2189): >>> loadUrlNow()
10-11 15:33:01.965: D/dalvikvm(2189): GC_CONCURRENT freed 352K, 5% free 9938K/10439K, paused 7ms+2ms
I have got also thewhith the ST2 App without microloaderCode:java.net.SocketException: Socket closed .. Unknown chromium error: -6
-
11 Oct 2012 9:19 AM #5
I've linked the sencha-touch-all.js in the index.html and it works,
It seems there is a problem with the code generated by the command line after<script type="text/javascript" charset="utf-8" src="sdk/sencha-touch-all.js"></script>
I've linked the sencha-touch.js in the index.html and it doesn't work :<!-- The line below must be kept intact for Sencha Command to build your application -->
And this file exists10-11 19:13:04.710: D/CordovaLog(13082): Uncaught Error: [Ext.Loader] Failed loading 'file:///android_asset/www/production/sdk/src/log/Logger.js', please verify that the file exists
Is there something to set ?
-
24 Oct 2012 12:41 PM #6
I've found the solution here :
http://stackoverflow.com/questions/1...phonegap-issue
You have to add at the top of app.js this code :
Ext.Loader.setConfig({ enabled: true, disableCaching: false });
-
24 Oct 2012 12:46 PM #7Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,118
- Vote Rating
- 453
- Answers
- 3160
You should not be loading classes, you need to do a build and make sure all your classes were required properly.
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.
-
24 Oct 2012 12:57 PM #8
Ok but when I make a build, it doesn't load.
After all the searches I've made, it seems to be a real problem, if you have a tutorial, I'm interested.
-
24 Oct 2012 3:38 PM #9


Reply With Quote