PDA

View Full Version : [INFOREQ] No launch and onReady event on Android 4.0.3



javaman
29 Oct 2012, 2:52 PM
REQUIRED INFORMATION


Sencha Touch version tested:

Sencha Touch 2.1 RC2

Android versions tested against:

4.0.3 on Samsung S2 GT-I9100

Description:

The app doesn't run. 'onReady' or 'launch' events don't fire. The app stills on blue screen with loading indicators forever. Tested with the new Sencha CMD 3.0.0.230

Steps to reproduce the problem:

Just create a new app: sencha generate app demo demo. After that, configure the packager.json to an Android device with 4.0.3 version and compile with native. The same app runs on Android 2.3 and iOS, with the same steps.

The result that was expected:

App starts and events fired



HELPFUL INFORMATION


Possible fix:

If I edit the index.html file and add the app.js file, deleting the code of the microloader, the events are fired

mitchellsimoens
30 Oct 2012, 1:46 AM
Have you checked out what errors are being thrown?

javaman
30 Oct 2012, 3:29 AM
Have you checked out what errors are being thrown?

There are no erros.

I really think that app.js is not being loaded, something with the microloader code in index.html

If I edit the index.html file and add the app.js file, everything seens to work fine, something like:



<script type="text/javascript" src="app.js"></script>


And like I said, the same app runs on iOS and Android 2.2 and 2.3.
It's seens to be something with Android 4.X

[]s

javaman
31 Oct 2012, 9:24 PM
Someone reported and seems to be the same bug: http://www.sencha.com/forum/showthread.php?228444-sencha-getting-started-tutorial-package(apk)-stuck-on-load-screen

[]'s

javaman
6 Nov 2012, 2:22 PM
The bug already exists on 2.1 final version

And I've already updated Sencha CMD to the last version (GA).

[]'s

koala2012
12 Dec 2012, 7:22 AM
Actually I have met the same problem with ST2.1 with white screen.
so I have used you solution that removed <scriptid="microloader" type="text/javascript"src="touch/microloader/development.js"></script> from the index.html. and add the line

<script type="text/javascript" src="app.js"></script>.

but when I am tried to used the sencha CMD to package native code. I got the error snapshot as following. is anybody have solution? thanks a lot
40768

javaman
12 Dec 2012, 8:26 PM
Your error don't look like mine.

It probably another thing.

I solved my problem looking this thread: http://www.sencha.com/forum/showthread.php?162322-Sencha-Touch-2-PhoneGap-are-not-working-on-Android-4&p=754810&viewfull=1#post754810

[]'s

koala2012
12 Dec 2012, 9:32 PM
Your error don't look like mine.

It probably another thing.

I solved my problem looking this thread: http://www.sencha.com/forum/showthread.php?162322-Sencha-Touch-2-PhoneGap-are-not-working-on-Android-4&p=754810&viewfull=1#post754810

[]'s

I am trying as above solution,but I am failed to start the application
add the
Ext.Loader.setConfig({ enabled: true, disableCaching: false }); on the first line of app.js

add
Ext.Ajax.setDisableCaching(false); in the Ext.application launch function

then I used Sencha touch CMD tool to make native code again. but once open APP on real device. it struck on start screen.

I am confused that 4.0.3 simulator can run my APP smoothly, why?????
is there any Sencha touch team guys know what's problem I have?