Waweru
Waweru

Reputation: 21

Android Studio Gradle Timeout Error

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

Answers (2)

Mohammad Zaer
Mohammad Zaer

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

Arshiya Khanum
Arshiya Khanum

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

Related Questions