使用退出代码1在cordova android应用程序中构建失败

时间:2016-02-01 13:11:28

标签: cordova ionic-framework

以下是错误消息:
 运行命令:“c:\ Program Files \ nodejs \ node.exe”c:\ wamp \ www \ ionic \ take1 \ hook     s \ after_prepare \ 010_add_platform_class.js c:/ wamp / www / ionic / take1     添加到body类:platform-android     运行命令:cmd“/ s / c”c:\ wamp \ www \ ionic \ take1 \ platforms \ android \ cordova \ b     uild.bat --debug“”     ANDROID_HOME = C:\ Program Files(x86)\ Android \ android-studio \ sdk     JAVA_HOME = C:\ Program Files \ Java \ jdk1.8.0_71     运行:c:\ wamp \ www \ ionic \ take1 \ platforms \ android \ gradlew cdvBuildDeenter code herebug -b c:\ w     amp \ www \ ionic \ take1 \ platforms \ android \ build.gradle -Dorg.gradle.daemon = true     正在下载http://services.gradle.org/distributions/gradle-2.2.1-all.zip

Exception in thread "main" java.lang.RuntimeException: java.net.ConnectException
: Connection timed out: connect
        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.ConnectException: Connection timed out: connect
        at java.net.DualStackPlainSocketImpl.connect0(Native Method)
        at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketI
mpl.java:79)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.ja
va:350)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocket
Impl.java:206)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java
:188)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:589)
        at java.net.Socket.connect(Socket.java:538)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:211)
        at sun.net.www.http.HttpClient.New(HttpClient.java:308)
        at sun.net.www.http.HttpClient.New(HttpClient.java:326)
        at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLC
onnection.java:1169)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConn
ection.java:1105)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConne
ction.java:999)
        at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection
.java:933)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLCo
nnection.java:1513)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
nection.java:1441)
        at org.gradle.wrapper.Download.downloadInternal(Download.java:59)
        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

c:\wamp\www\ionic\take1\platforms\android\cordova\node_modules\q\q.js:126
                    throw e;
                    ^
 Error code 1 for command: cmd with args: /s /c "c:\wamp\www\ionic\take1\platfor
ms\android\gradlew cdvBuildDebug -b c:\wamp\www\ionic\take1\platforms\android\bu
ild.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

0 个答案:

没有答案