尝试构建使用Cordova CLI创建的项目时出现此错误。我已将android平台添加到项目中。
D:\MHIS_Phonegap\MHIS>cordova build --info android
Running command: cmd "/s /c "D:\MHIS_Phonegap\MHIS\platforms\android\cordova\build.bat""
ANDROID_HOME=E:\adt-bundle-windows-x86_64-20130522\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.7.0_21
Running: D:\MHIS_Phonegap\MHIS\platforms\android\gradlew cdvBuildDebug -b D:\MHIS_Phonegap\MHIS\platforms\android\build.gradle -Dorg.gradle.daemon=true
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:1.0.0+.
Required by:
:android:unspecified
> Failed to list versions for com.android.tools.build:gradle.
> Unable to load Maven meta-data from https://repo1.maven.org/maven2/com/android/tools/build/gradle/maven-metadata.xml.
> Could not GET 'https://repo1.maven.org/maven2/com/android/tools/build/gradle/maven-metadata.xml'.
> peer not authenticated
* 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: 11.562 secs
D:\MHIS_Phonegap\MHIS\platforms\android\cordova\node_modules\q\q.js:126
throw e;
^
Error code 1 for command: cmd with args: /s /c "D:\MHIS_Phonegap\MHIS\platforms\android\gradlew cdvBuildDebug -b D:\MHIS_Phonegap\MHIS\platforms\android\build.gradle -Dorg.gradle.daemon=true"
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
at ChildProcess.whenDone (C:\Users\lenovo\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:134:23)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
有关原因和解决方法的任何帮助?