You may not have the required environment or OS to build this project

Have been trying to run ionic run android and cordova run android for hours now. I have all SDKs and ant in my path. I have removed plugins and added and removed the android platform numerous times.

/Users/cpk2/android-sdk/tools/ant/build.xml:653: The following error occurred while executing this line:
/Users/cpk2/android-sdk/tools/ant/build.xml:698: null returned: 1

Total time: 3 seconds

                    throw e;
Error code 1 for command: ant with args: debug,-f,/Users/cpk2/Sites/myApp/platforms/android/build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
ERROR running one or more of the platforms: Error: /Users/cpk2/Sites/myApp/platforms/android/cordova/run: Command failed with exit code 1
You may not have the required environment or OS to run this project

Ionic info:

OS: Mac OS X Yosemite
Node Version: v0.12.2
Cordova CLI: 4.3.0
Ionic CLI Version: 1.3.19
Xcode version: Xcode 6.2 Build version 6C131e 
ios-sim version: 3.1.1 
ios-deploy version: 1.4.0 

I know that it is project specific because I can run a the starter app… Many thanks.

try to reload adb, run:

adb kill-server
adb devices

then plug the device in again.
It works for me

1 Like

Just remove and add the platform [android or ios]

sudo ionic platform remove android
sudo ionic platform add android

its done !!

1 Like