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?


#8

Hi, I have this error when trying to emulate android, hope you can help me, if you have any idea whats causing it, thanks

Waiting for emulator to boot (this may take a while)…BOOT COMPLETE
Warning: restoring GLES1 context from snapshot. App may need reloading.
Skipping build…
Built the following apk(s):

(node:3826) UnhandledPromiseRejectionWarning: Error: Could not find apk architecture: x86 build-type: debug
at Object.module.exports.findBestApkForArchitecture (/Users/dev/Desktop/jelly/platforms/android/cordova/lib/build.js:220:11)
at /Users/dev/Desktop/jelly/platforms/android/cordova/lib/emulator.js:456:34
at _fulfilled (/Users/dev/Desktop/jelly/platforms/android/cordova/node_modules/q/q.js:854:54)
at /Users/dev/Desktop/jelly/platforms/android/cordova/node_modules/q/q.js:883:30
at Promise.promise.promiseDispatch (/Users/dev/Desktop/jelly/platforms/android/cordova/node_modules/q/q.js:816:13)
at /Users/dev/Desktop/jelly/platforms/android/cordova/node_modules/q/q.js:570:49
at runSingle (/Users/dev/Desktop/jelly/platforms/android/cordova/node_modules/q/q.js:137:13)
at flush (/Users/dev/Desktop/jelly/platforms/android/cordova/node_modules/q/q.js:125:13)
at process._tickCallback (internal/process/next_tick.js:61:11)
(node:3826) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:3826) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
glTexImage2D: got err pre :frowning: 0x506 internal 0x1908 format 0x1908 type 0x1401
glTexImage2D: got err pre :frowning: 0x506 internal 0x1908 format 0x1908 type 0x1401