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
I have +4 years of quality experience in Front-End Developer from India. I have worked on HTML5, CSS3, JSON, XML, Angular, jQuery, WordPress, Bootstrap for developing tabled, table-less, responsive and non-Responsive web-sites. I have worked on many complicated and easy design in some top level web development companies in India while also working on independent projects as freelancer.

Comments are closed.