on 09-09-2015 2:53 PM
Hi all,
I am trying to install the Hybrid App Toolkit (v1.7.2) by following this guide .
However, I got a problem at the "1. Check Hybrid Development Prequisite" section: I pass all the checks but the "5. Cordova Build Android Project", reporting this error message:
--
ERROR!
cordova build android project error!
Running command: cmd "/s /c "C:\Users\S3B95~1.PAL\AppData\Local\Temp\~cp\hello\platforms\android\cordova\build.bat""
ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_60
Running: C:\Users\S3B95~1.PAL\AppData\Local\Temp\~cp\hello\platforms\android\gradlew cdvBuildDebug -b C:\Users\S3B95~1.PAL\AppData\Local\Temp\~cp\hello\platforms\android\build.gradle -Dorg.gradle.daemon=true
Downloading http://services.gradle.org/distributions/gradle-2.2.1-all.zip
Exception in thread "main" java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.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 refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.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.(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(HttpURLConnection.java:1168)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1104)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:998)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:932)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1512)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440)
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(ExclusiveFileAccessManager.java:65)
... 3 more
C:\Users\S3B95~1.PAL\AppData\Local\Temp\~cp\hello\platforms\android\cordova\node_modules\q\q.js:126
throw e;
^
Error code 1 for command: cmd with args: /s /c "C:\Users\S3B95~1.PAL\AppData\Local\Temp\~cp\hello\platforms\android\gradlew cdvBuildDebug -b C:\Users\S3B95~1.PAL\AppData\Local\Temp\~cp\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\s.palmisano\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:134:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:766:16)
at Process.ChildProcess._handle.onexit (child_process.js:833:5)
--
I guessed that the problem was the impossibility to download the gradle.2.2.1.zip. Therefore, I tried to follow these suggestions http://stackoverflow.com/questions/29874564/ionic-build-android-error-when-download-gradle (1st and 4th answers, i.e. trying to modify the DistributionURL in the build,js file) with no success.
Any suggestion would be highly appreciated!
Thank You in advance,
Simone
Hi Simone,
Try creating a gradle.properties file in /Users/<user>/.gradle
With contents of…
systemProp.http.proxyHost=yourproxyhost
systemProp.http.proxyPort=yourproxyhostport
systemProp.https.proxyHost=yourproxyhost
systemProp.https.proxyPort=yourproxyhostport
and then rerun the setup.
Regards,
Jamie
SAP - Technology RIG
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jamie,
I've got an similar error at the same step today, just with another error code. Have you also an idea on that?
First some information on my environment:
Windows 8.1 x64
node -v
v0.10.38
npm -v
1.4.28
ant -v
Apache Ant(TM) version 1.9.5 compiled on May 31 2015
Trying the default build file: build.xml
Buildfile: build.xml does not exist!
Build failed
cordova -v
5.1.1
kapsel -version
3.9.8
java -version
java version "1.7.0_79"
Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)
git --version
git version 2.5.0.windows.1
Followed you see the error in step 5. (Cordova Build Android Project):
Cordova project creation is complete.
The android for Cordova is added.
ERROR:
cordova build android project error!
Running command: cmd "/s /c "C:\Users\myusername\AppData\Local\Temp\~cp\hello\platforms\android\cordova\build.bat""
ERROR building one of the platforms: Error: cmd: Command failed with exit code 2
You may not have the required environment or OS to build this project
Error: cmd: Command failed with exit code 2
at ChildProcess.whenDone (C:\Users\myusername\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:134:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:766:16)
at Process.ChildProcess._handle.onexit (child_process.js:833:5)
----------------------
Best regards and thanks a lot for your help in advance,
Steffen
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.