All posts in cordova

Command line failed with exit code 8 in phoneGap Cordova

I had ‘command line failed with exit code 8′ after I copied my workspace from another machine and tried the ‘run’ command on the new machine.
The ‘phonegap run android’ command will execute ant from the platformsandroid directory. Execute it yourself and you may see a more detailed error message.

cd platforms/android  

Doing this helped me to identify the cause of my issue – the additional error information ant gave me highlighted that my Android Development Toolkit (ADT) installation was not at the location that ant was expecting. It must get written into the build command at the time the platform gets added.
I fixed this by (I’m using cordova) removing and re-adding android support as follows:

cordova platform remove android  
cordova platform add android