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

ANCHALOSE Y picture ANCHALOSE Y · May 21, 2015 · Viewed 10.9k times · Source

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

Answer

Ashik picture Ashik · Jul 27, 2015

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.