cordova build报错【求助!在线等!】
本帖最后由 zfdcyy 于 2015-6-24 11:29 编辑各位大神好,本人第一次接触移动开发,打算从Cordova入手,按照官方的教程,目前卡在了:cordova build 这个阶段。
我用的配置环境是:
JDK 1.7
ANT 1.9.5
SDK:API22
我build的时候就会下载gradle-2.2.1-all.zip,首先会耗时很久,不知道有没有什么办法可以解决?
还有就是会下载完后会报下面这个错:
............................................................................
Exception in thread "main" java.lang.RuntimeException: java.net.SocketException:
Connection reset
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAcc
essManager.java:78)
at org.gradle.wrapper.Install.createDist(Install.java:47)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:196)
at java.net.SocketInputStream.read(SocketInputStream.java:122)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:273)
at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
at sun.net.www.MeteredStream.read(MeteredStream.java:134)
at java.io.FilterInputStream.read(FilterInputStream.java:133)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(Http
URLConnection.java:3053)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(Http
URLConnection.java:3047)
at org.gradle.wrapper.Download.downloadInternal(Download.java:63)
at org.gradle.wrapper.Download.download(Download.java:45)
at org.gradle.wrapper.Install$1.call(Install.java:60)
at org.gradle.wrapper.Install$1.call(Install.java:47)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAcc
essManager.java:65)
... 3 more
E:\study\mobiletest\hello\platforms\android\cordova\node_modules\q\q.js:126
throw e;
^
Error code 1 for command: cmd with args: /s /c "E:\study\mobiletest\hello\platfo
rms\android\gradlew cdvBuildDebug -b E:\study\mobiletest\hello\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:\Program Files\nodejs\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)
已经弄了好久了,各位大神帮帮忙吧!
能截取个图吗 报错截图如下,麻烦帮忙看一下怎么回事,我本地下载了gradle,并且把路径添加到path环境变量后,就不需要重复下载了,但是还是会报如图中的错误,谢谢! 解决了,原因还是无法通过控制台下载资源,所以手动下载后,还需要放在指定的目录下:我的是:D:\userprofile\sqgyck\.gradle\wrapper\dists\gradle-2.2.1-all\2m8005s69iu8v0oiejfej094b,大家可以参照的自己来,直接把压缩包放进去就可以了。
页:
[1]