upkar
upkar

Reputation: 11

Ionic Build android Error with Exit code 1

BUILD FAILED

C:\Program Files\Android\Sdk\tools\ant\build.xml:716: The following error occurr
ed while executing this line:
C:\Program Files\Android\Sdk\tools\ant\build.xml:730: Compile failed; see the co
mpiler error output for details.

Total time: 2 seconds

F:\todo\Ionic\Teller\src\platforms\android\cordova\node_modules\q\q.js:126 throw e; ^ Error code 1 for command: cmd with args: /s,/c,ant,debug,-f,F:\Verifast\Ionic\Te ller\src\platforms\android\build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant- gen ERROR building one of the platforms: Error: cmd: Command failed with exit code 1

You may not have the required environment or OS to build this project Error: cmd: Command failed with exit code 1

Please help

Upvotes: 1

Views: 8320

Answers (2)

taranjeetsapra
taranjeetsapra

Reputation: 572

cordova platform update android

will fix the error. Cordova is always one behind the android version eg if we have android API 24 then we have cordova 5.x.x supporting upto API 23. Hence any project is build using API 24(eg. using Android Studio) will show this error.

For better understanding I have posted error that I got:

Error: cmd: Command failed with exit code 1 Error output: FAILURE: Build failed with an exception.

Upvotes: 0

KAUSHAL J. SATHWARA
KAUSHAL J. SATHWARA

Reputation: 994

try running the android tools and installing the items below:

Open the SDK manager.

You will require:
1. "SDK Platform" for android-23
2. "Android SDK Platform-tools (latest)
3. "Android SDK Build-tools" (latest)]

Upvotes: 2

Related Questions