Ahmadreza
Ahmadreza

Reputation: 384

Error:Connection timed out: connect

I changed the version of gradle of Android Studio 1.5.1 from 1.5 to 2.10 and clicked sync now, (error image) but the follow ERROR ocurred :

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

Upvotes: 8

Views: 42377

Answers (2)

Kamau Mbûgua
Kamau Mbûgua

Reputation: 936

Incase you are still experiencing this error and not using any proxy, this is the way I solved my error by navigating to :

C:\Users\AdminUser\.gradle then locate gradle.properties

deleted the code with proxy settings as below:

systemProp.http.proxyHost=proxyIP
systemProp.http.proxyPort=8080
systemProp.https.proxyHost=proxyIP
systemProp.https.proxyPort=8080

Upvotes: 1

Abolfazl Miadian
Abolfazl Miadian

Reputation: 3159

go to your gradle.properties file in gradle scripts and add this :

systemProp.http.proxyHost=127.0.0.1

systemProp.http.proxyPort=3128 // enter your proxy port

systemProp.https.proxyHost=127.0.0.1

systemProp.https.proxyPort=3128 // enter your proxy port.

You can find proxy port by going to internet option-> connections -> LAN settings -> Advanced -> port

Upvotes: 14

Related Questions