Reputation: 21
I am trying to open an existing android project in android studio, however when I try to refresh and build gradle I get an error; "Gradle 'project name' project refresh failed: Error: Connection timed out. If you are behind an HTTP proxy, please configure the proxy settings either in IDE or Gradle." However, I am not behind a proxy. Additionally, it takes a very long time for the whole build process, approximately 1 hour 30 minutes. Please help. Thanks.
Upvotes: 2
Views: 15460
Reputation: 696
choose working proxy and set it in gradle.properties like this:
systemProp.https.proxyHost=127.0.0.1
systemProp.http.proxyPort=9666
Upvotes: 0
Reputation: 471
Try building the app after setting gradle to offline.
File->Settings->Gradle and set 'offline' to checked. This will build the app within seconds.
When you want to download any libraries just set 'offline' to unchecked and build.
Upvotes: 15