Cordova构建android异常

时间:2016-07-25 10:26:16

标签: android cordova

我尝试使用cordova构建Android应用程序,当我启动时:

cordova build android

发生错误,我不明白如何解决此问题。 如果我使用Android Studio构建我的项目,则IDE会修复gradle,但如果我尝试使用cordova命令行编译,则会出现我指出的错误。

我怎么解决?我需要使用命令行而不是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"

0 个答案:

没有答案