Reputation: 11
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
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.
What went wrong: A problem occurred configuring root project 'android'.
Could not resolve all dependencies for configuration ':_debugApk'. A problem occurred configuring project ':CordovaLib'. Could not resolve all dependencies for configuration ':CordovaLib:classpath'. Could not find com.android.tools.build:gradle:2.2.3. Searched in the following locations: https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.pom https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.jar Required by: android:CordovaLib:unspecified
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Upvotes: 0
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