$ cordova build android --debug Checking Java JDK and Android SDK versions ANDROID_SDK_ROOT=undefined (recommended setting) ANDROID_HOME=E:\\andoidSDK (DEPRECATED) S
In my case this was caused by a wrong value in your config.xml for android-versionCode
This value should be numerical only.