Error Deploying APK to Android Device -- Error: adb: Command failed with exit code ENOENT


#1

I am able to build the application but it fails while being uploaded to the connected device.

I received the error:
Error: adb: Command failed with exit code ENOENT

When I issue the command:
ionic run android

I was able to manually install the resulting APK directly to the device and it appears to function correctly, suggesting that the problem is not with the custom application itself.

Issuing the ionic command with --verbose yields the following:
Error: adb: Command failed with exit code ENOENT
at ChildProcess.whenDone (/{edited}/ionic/{projectName}/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
at emitOne (events.js:96:13)
at ChildProcess.emit (events.js:188:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:213:12)
at onErrorNT (internal/child_process.js:359:16)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)

The work around is to install the application manually but given that I’m in the middle of development, it’s less than convenient.

ionic 2.1.12
npm 4.0.3
node 6.9.1
cordova 6.4.0

Any insight or suggestions would be appreciated.


#2

Got the same error. In my case it was an issue of android sdk path. Check out this answer.