Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialNoel Chiwanga
7,306 PointsPlease help with problems on Gradle sync failed:
Please help to solve this in Android Studio: Gradle sync failed: Connection timed out: connect. If you are behind an HTTP proxy, please configure the proxy settings either in IDE or Gradle.
Noel Chiwanga
7,306 PointsThanks let me try it
Noel Chiwanga
7,306 PointsI have configured my gradle.properties as below, but still having the same error. The details below are the proxy parameters for my internet connection
systemProp.http.proxyPassword=chiwanga systemProp.http.proxyHost=192.168.1.64 systemProp.http.proxyPort=8080 systemProp.http.proxyUser=netone\noelc
shivkumar loka
4,066 Pointsshivkumar loka
4,066 PointsHey Noel,
Seems like gradle is trying to connect to the internet to download project dependencies and is failing to do so - hence the sync failed message. You will essentially need to tell gradle how to access network by configuring the gradle.properties file in your machines root. You can look at configuring your network settings as follows:
Configuring an HTTP proxy
There are separate settings for HTTPS.
Configuring an HTTPS proxy
You can also try marking - work in offline mode to see if the error message changes - to confirm that the problem actually occurs when gradle tries to connect to the network.
Refer to this link for more information: https://docs.gradle.org/current/userguide/build_environment.html#sec:accessing_the_web_via_a_proxy