C:\NodeJS\PhoneGapApp1>phonegap run android --emulator
[phonegap] detecting Android SDK environment...
[phonegap] using the local environment
[phonegap] compiling Android...
[phonegap] successfully compiled Android app
[phonegap] installing app onto emulator
[error] An error occurred while emulating/deploying the android project.
C:\NodeJS\PhoneGapApp1\platforms\android\cordova\node_modules\q\q.js:126
throw e;
^
Error executing "adb devices": ** daemon still not running
error: cannot connect to daemon
First time with phonegap and none of the solutions online worked, its all fresh an updated install of phonegap and android sdk. I don't have eclipse or anything I want to start from any simple text editor, I just want to be able to run "phonegap run android --emulator" and then start from there. It's very frustrating I thought using phonegap is as simple as using your knowledge in html, css and javascript and phonegap will be the one porting it.
I also ran into this problem with a fresh install of Phonegap and I did find a solution. I will say that the documentation for phonegap is rather frustrating at best - tutorial still reference cordova cli and is simply wrong, and a LOT of steps that are needed to work with the latest android SDK are missing ... to wit ...
If you look in the latest Android SDK 'tools' folder you will see a text file in there "adb_has_moved.txt". And, in fact, the did move adb into the "platform-tools" folder. I was able to solve my phonegap adb error message by adding "platform-tools" to my PATH environment variable.
Hope that works for you too.
To resolve the issue, just add your path to platform-tools (example of the path - C:\Program Files (x86)\Android\android-sdk\platform-tools) to the PATH variable, reopen console (so PATH variable will be updated) and execute "phonegap run android" again. After this phonegap will be able to find the ADB tool and will be able to start emulator.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With