2

I'm trying to build an Android application with cordova, when i launch:

cordova build android

an error occurred, and i don't understand how to solve this problem. If i build my project with Android Studio the gradle is fixed by the IDE, but if i try to compile with cordova command line i have the error that i indicated.

How i can solve ? I need to use command line not Android Studio.

ANDROID_HOME=E:\sdk
JAVA_HOME=C:\Program Files\java\jdk1.8.0_91    
FAILURE: Build failed with an exception.

* Where:
Build file 'C:\Users\MY\Desktop\testSpeedTest\platforms\android\build.gradle' line: 22

* What went wrong:
A problem occurred evaluating root project 'android'.
> Failed to apply plugin [id 'android']
   > Gradle version 2.10 is required. Current version is 2.2.1. If using the gradle wrapper, try editing the distributionUrl in C:\Users\MY\Desktop\testSpeedTest\gradle\wrapper\gradle-wrapper.properties to gradle-2.10-all.zip

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 1.777 secs
Error: Error code 1 for command: cmd with args: /s,/c,"C:\Users\MY\Desktop\testSpeedTest\platforms\android\gradlew cdvBuildDebug -b C:\Users\MY\Desktop\testSpeedTest\platforms\android\build.gradle -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"
  • Check out this link - http://stackoverflow.com/questions/37367247/how-to-sync-gradle-with-apache-cordova/37371948#37371948 – Gandhi Jul 25 '16 at 10:56

0 Answers0