Ionic emulate android error


#1

I can build and emulate on ios simulator but not on android.

I tried ionic emulate android and i also tried ionic run android while plugging up my htcone.

Here is the error i get…

/Users/robertolide/uc2/platforms/android/cordova/node_modules/q/q.js:126
                    throw e;
                          ^
Error executing "adb devices": /bin/sh: adb: command not found

Error: /Users/robertolide/uc2/platforms/android/cordova/run: Command failed with exit code 8
    at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at maybeClose (child_process.js:753:16)
    at Process.ChildProcess._handle.onexit (child_process.js:820:5)
ERROR: Unable to run app on platform android. Please see console for more info.

#2

Any insight would be helpful, thanks!


#3

What OS are you on Windows or Mac?

What version of that os, also do you have ant installed?


#4

OSX Version 10.9.3

yes sir: ant-1.9.4 already installed


#5

Also, is your android sdk added to you path?


#6

by added to my path, were would I do that. I can ionic build android but i cant run or emulate.

in my .bash_profile

i have this…
PATH="/Users/robertolide/Documents/android-sdk-macosx/tools:/Development/android-sdk-macosx/platform-tools:$PATH"

thats were its located on mys system
/Users/robertolide/Documents/android-sdk-macosx/tools

is that correct?


#7

Try changing your path to this, just to be sure, follow the setup again from cordova’s site

export PATH=${PATH}:/Documents/android-sdk-macosx/platform-tools:/Documents/android-sdk-macosx/tools

This could just be an issue with your phone not being recognized. With your phone connected, can you run adb devices?