各位大神好,本人第一次接触移动开发,打算从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)