cordova build出现问题
黑框框里出现下面的错误。。Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
C:\Users\Administrator>e:
E:\>cd jqmobi
E:\jqmobi>cd hello
E:\jqmobi\hello>cordova platform add android
Platform android already added.
E:\jqmobi\hello>cordova build
Running command: cmd "/s /c "E:\jqmobi\hello\platforms\android\cordova\build.bat
""
ANDROID_HOME=D:\adt-bundle-windows-x86-20140321\adt-bundle-windows-x86-20140321\
sdk
JAVA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_31
Running: E:\jqmobi\hello\platforms\android\gradlew cdvBuildDebug -b E:\jqmobi\he
llo\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 org.apache.commons:commons-compress:1.8.1.
Required by:
:android:unspecified > com.android.tools.build:gradle:1.0.0 > com.andro
id.tools.build:builder:1.0.0 > com.android.tools:sdklib:24.0.0
> Could not HEAD 'https://repo1.maven.org/maven2/org/apache/commons/common
s-compress/1.8.1/commons-compress-1.8.1.pom'.
> 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: 1 mins 23.442 secs
E:\jqmobi\hello\platforms\android\cordova\node_modules\q\q.js:126
throw e;
^
Error code 1 for command: cmd with args: /s /c "E:\jqmobi\hello\platforms\androi
d\gradlew cdvBuildDebug -b E:\jqmobi\hello\platforms\android\build.gradle -Dorg.
gradle.daemon=true"
ERROR building one of the platforms: Error: cmd: Command failed with exit code 8
You may not have the required environment or OS to build this project
Error: cmd: Command failed with exit code 8
at ChildProcess.whenDone (C:\Users\Administrator\AppData\Roaming\npm\node_mo
dules\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:139:23)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:753:16)
at Process.ChildProcess._handle.onexit (child_process.js:820:5)
E:\jqmobi\hello>
检查环境变量配置是否正确
页:
[1]