简体   繁体   中英

Deviceready event in PhoneGap Hello World application doesn't fires

I have decided to play a little with the sample PhoneGap "Hello world" application. I have already configured Ant, Node, Android SDK and everything else to make it works. My last step was typing the following commands:

$ phonegap create my-app
$ cd my-app
$ phonegap run android --device <my_device_id>

Everything built and installed perfectly, but when I run the application I see only "Connecting to device" message. That means that "deviceready" event doesn't fires. I installed Ripple in my Chrome to check it from PC - and it works. I saw the message "Device is ready". But on my device it is still "Connecting to device". I have even asked my friend with another android phone to check this out and he saw the same message - "Connecting to device". How can I debug it and what can I try to do?

This a really confused me, but my solution is following: According to this documentation http://cordova.apache.org/docs/en/3.5.0/guide_cli_index.md.html I used cordova instead of phonegap and everything works nice. The question I have in my mind - why they supports old methods, that even doesn't properly works? Anyway, this is solved.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM