-
28 Jan 2013 5:24 AM #1
Answered: App hangs on appLoadingIndicator on Android native app - microloader issue
Answered: App hangs on appLoadingIndicator on Android native app - microloader issue
I have built my app using:
And deployed it to my device (Android v4.0.4) using:Code:sencha app build
When the app starts on the device, it hangs on the appLoadingIndicator. I have been able to debug it to the point of understanding where the error happens, but I can't seem to get the why, or come up with a fix.Code:sencha app package run packager.json
The error occurs in this function in the microloader/production.js file:
The problem is that xhr.open(...) is trying to open app.json (which is present in the same directory as the index.html file running this script), but the status returned is 0 and the responseText is an empty string. So, the onFailure() method gets called and the app just hangs.Code:function requestXhr(uri, onSuccess, onFailure) { var xhr = new XMLHttpRequest(); onFailure = onFailure || emptyFn; uri = uri + ((uri.indexOf('?') == -1) ? '?' : '&') + Date.now(); try { xhr.open('GET', uri, true); xhr.onreadystatechange = function() { if (xhr.readyState == 4) { var status = xhr.status, content = xhr.responseText; if ((status >= 200 && status < 300) || status == 304 || (status == 0 && content.length > 0)) { onSuccess(content); } else { onFailure(); } } }; xhr.send(null); } catch (e) { onFailure(); } }
Can anybody please help with this issue? Thanks in advance...
-
Best Answer Posted by kevhender
I have figured this one out. I was using the "production" build, which is the default when doing "sencha app build".
I switched to using "sencha app build package" and it seems to be working. I have yet to figure out what the "production" build is actually for (thanks, [terrible] Sencha docs!), but hopefully this info helps others out.
-
29 Jan 2013 6:29 AM #2
-
29 Jan 2013 8:23 AM #3
FYI Danny, I have posted a bug here: http://www.sencha.com/forum/showthread.php?254905
I am hoping that Sencha addresses this soon. Seems like a huge issue if people can't create working native apps...
If anyone else has insight in the meantime, feel free to pitch in.
-
29 Jan 2013 1:17 PM #4
How about Cordova/Phone gap
How about Cordova/Phone gap
I don't have answer for this problem. However, how about trying Cordova/Phonegap with your app. In the Examples forum Brice Mason has a Cordova Builder utility which automates the process.
While you are waiting for fix from Sencha - you might want to give this a try.
-
31 Jan 2013 5:37 AM #5
I have figured this one out. I was using the "production" build, which is the default when doing "sencha app build".
I switched to using "sencha app build package" and it seems to be working. I have yet to figure out what the "production" build is actually for (thanks, [terrible] Sencha docs!), but hopefully this info helps others out.


Reply With Quote