adb command failed with exit code null when emulate or run
See original GitHub issueFrom @swizardlv on April 11, 2016 1:15
Note: for support questions, please use one of these channels:
https://forum.ionicframework.com/ http://ionicworldwide.herokuapp.com/
Short description of the problem:
sometimes when run 'ionic emulate android ’ or ‘ionic run android’
swizard@swizarddeMacBook-Pro:~/ws/rwworks/rich_mobile
>ionic emulate android
Running command: /Users/swizard/ws/rwworks/rich_mobile/hooks/after_prepare/010_add_platform_class.js /Users/swizard/ws/rwworks/rich_mobile
add to body class: platform-android
ANDROID_HOME=/Users/swizard/Documents/dev/android-sdk-macosx
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home
Error: adb: Command failed with exit code null
it can be fixed only restart the system.
What behavior are you expecting?
the ionic emulate and run can be called successfully.
Steps to reproduce: no steps to reproduce.
Where can I find the debug information?
insert any relevant code between the above and below backticks
Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)
Which Ionic Version? 1.x
Plunker that shows an example of your issue
For Ionic 1 issues - http://plnkr.co/edit/jnOrQRtE8rN2WCXDQYQY?p=info
For Ionic 2 issues - http://plnkr.co/edit/TW20lftdc5s622pcJPkp?p=info
Run ionic info
from terminal/cmd prompt: (paste output below)
> ionic info
Your system information:
Cordova CLI: 6.0.0
Gulp version: CLI version 3.9.0
Gulp local: Local version 3.9.1
Ionic Version: 1.2.4
Ionic CLI Version: 1.7.14
Ionic App Lib Version: 0.7.0
ios-deploy version: 1.8.5
ios-sim version: 5.0.6
OS: Mac OS X El Capitan
Node Version: v5.2.0
Xcode version: Xcode 7.2.1 Build version 7C1002
Copied from original issue: driftyco/ionic#6111
Issue Analytics
- State:
- Created 7 years ago
- Comments:12 (4 by maintainers)
I don’t know if this will help anyone. But I was having the exact same error. I couldn’t kill adb and I couldn’t restart it. After searching for some time I came up with people who had the same issue because other software was using a different version of adb (this only started happening after I upgraded to the latest Android Studio). So I started hunting through my machine.
It turned out that GapDebug was using an old version of adb and that was running in the background. Once I closed GapDebug the error went away. People suggested replacing adb in the application with the problem, but I’ve not bothered trying that at the moment, as I don’t actually use GapDebug anyway.
That’s exactly what was happening to me. I closed GapDebug and adb is working just fine now. Thank you very much @AllenConquest.