Gradle properties proxy not recognized

1.9k Views Asked by At

I'm trying to resolve the dependencies from a gradle project, When I opened the project and tried to synchronize gradle I got the following error:

Error:Connection timed out: connect. If you are behind an HTTP proxy, please configure the proxy settings either in IDE or Gradle.

Then I realized that I needed to configure the proxy of the company network in gradle, I set the proxy in the gradle.properties file:

systemProp.http.proxyHost=someIP
systemProp.http.proxyPort=somePort
systemProp.http.proxyUser=user
systemProp.http.proxyPassword=pswd
systemProp.http.nonProxyHosts=*.nonproxyrepos.com|localhost

systemProp.https.proxyHost=someIP
systemProp.https.proxyPort=somePort
systemProp.https.proxyUser=user
systemProp.https.proxyPassword=pswd
systemProp.https.nonProxyHosts=*.nonproxyrepos.com|localhost

Then I retried to synchronize the gradle project, but I'm getting the same error:

Error:Connection timed out: connect. If you are behind an HTTP proxy, please configure the proxy settings either in IDE or Gradle.

The gradle.properties file is in the following path:

project/gradle.properties

enter image description here

I executed gradlew.bat from the command line and I got the next exception:

Exception in thread "main"
javax.net.ssl.SSLException: Received fatal alert: protocol_version
at sun.security.ssl.Alerts.getSSLException(Alerts.java: 208)
at sun.security.ssl.Alerts.getSSLException(Alerts.java: 154)
at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java: 1979)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java: 1086)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java: 1332)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java: 1359)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java: 1343)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:
    559)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java: 185)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon nection.java: 1301)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Http sURLConnectionImpl.java: 254)
at org.gradle.wrapper.Download.downloadInternal(Download.java: 56)
at org.gradle.wrapper.Download.download(Download.java: 42)
at org.gradle.wrapper.Install$1.call(Install.java: 57)
at org.gradle.wrapper.Install$1.call(Install.java: 44)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAcc essManager.java: 65)
at org.gradle.wrapper.Install.createDist(Install.java: 44)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java: 126)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java: 56)
0

There are 0 best solutions below