Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

phonegap run android Error executing "adb devices": ** daemon still not running node_modules\q\q.js:126 throw e;

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.

like image 339
user1481541 Avatar asked Dec 12 '22 08:12

user1481541


2 Answers

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.

like image 141
durwood Avatar answered May 20 '23 22:05

durwood


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.

like image 28
szhuravel Avatar answered May 20 '23 22:05

szhuravel