Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The command "platforms\android\cordova\clean.bat" exited with code 2

While am debug my solution in Visual Studio 2015 Cordova this issue occured The command "platforms\android\cordova\clean.bat" exited with code 2.

like image 827
ANCHALOSE Y Avatar asked May 21 '15 13:05

ANCHALOSE Y


2 Answers

In Visual Studio 2015, Menu: Tools => Options => Tools for Apache Cordova => Environment Variable Overrides set the correct ADT_HOME and JAVA_HOME.

Also Clean Cordova cache from the Cordova Tools. Then open and debug your project.

like image 149
Ashik Avatar answered Nov 08 '22 15:11

Ashik


I ended in a similar issue when I installed the VS.Net2015 and tried to create a blank Cordova project and compile. I did try a lot of different things including reinstalling Android Studio and VS but none helped.

Finally what it boiled down to was that I had a 64Bit OS an installed a 32bit JDK which somehow didn't work well together. Downloaded the 64Bit JDK and corrected the Path in visual studio and now its working.

Regards Kiran

like image 30
Kiran Avatar answered Nov 08 '22 14:11

Kiran