Question

I'm using PhoneGap 2.7.0 and am following the simple command line build/install instructions here. I'm building for Android, on Windows. My debugging and testing is mostly done in Chrome using Ripple, but also using the Android emulator and installed on my Nexus 7.

First, I'll say what works. For a simple ondeviceready javascript code of the kind shown here in the PhoneGap documentation everything works great in Chrome, in the emulator, and on the device. I use the command-line method of building and installing the code on the device as listed here:

$ /path/to/my_new_cordova_project/cordova/build.bat
$ /path/to/my_new_cordova_project/cordova/run.bat

Great. Now, comes the problem. When I write some more javascript and test it in Chrome, everything is the same as it was before (working correctly), but when I try to run the cordova/build.bat script, it runs silently as usual (no errors or warnings), finishes much quicker, BUT fails to produce an .apk file. Question: Is there a good way to find out where the build.bat script fails and why?

The Chrome console output for all cases (when the build works and when it doesn't) is as follows. I have to fire the "deviceready" event manually in the Ripple emulator. But that's just a problem with the emulator and is not an issue when deployed to the device.

Ripple :: Environment Warming Up (Tea. Earl Gray. Hot.) ripple.js:37
GET http://localhost/thrifty-bunch-v1/assets/www/config.xml 404 (Not Found) ripple.js:50
cordova :: Initialization Finished (Make it so.) ripple.js:37
deviceready has not fired after 5 seconds. cordova-2.7.0.js:6672
Channel not fired: onPluginsReady cordova-2.7.0.js:6665
Channel not fired: onCordovaReady cordova-2.7.0.js:6665
Channel not fired: onCordovaConnectionReady cordova-2.7.0.js:6665
deviceready has not fired after 5 seconds. cordova-2.7.0.js:6672
Channel not fired: onPluginsReady cordova-2.7.0.js:6665
Channel not fired: onCordovaReady cordova-2.7.0.js:6665
Channel not fired: onCordovaConnectionReady
Was it helpful?

Solution

OTHER TIPS

I think the error lies within phonegap 2.7. I have the same issue, it works with 2.6 but gives the same issue with 2.7. I also get the extra error code here:

cordova :: Initialization Finished (Make it so.)
Uncaught SyntaxError: Unexpected token <   cordova.js:6816
deviceready has not fired after 5 seconds.

create a file cordova_plugins.json that contains {}. then go to cordova-2.7.0.js and comment this line require('cordova/channel').onNativeReady.fire(); then when development done, add it back

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top