I often get the following error while trying to sync gradle
Error:Connection timed out: connect. If you are behind an HTTP proxy, please configure the proxy settings either in ide or gradle.
Sometimes that i don't get the error, gradle sync takes more than 1 hour
Try to open and check this url in your browser Google DL and try downloading latest Gradle version from Gradle Site
If you aren't able to access and download the files the time consumption is because you might be getting 403. You might not be having download access on your machine. Contact your network administrator and ask for access.
Configure your gradle.properties with below settings -
systemProp.http.proxyPassword=
systemProp.http.proxyHost=
systemProp.http.proxyPort=
systemProp.http.proxyUser=
systemProp.https.proxyPort=
systemProp.https.proxyUser=
systemProp.https.proxyHost=
systemProp.https.proxyPassword=
Or you can go to Settings -> HTTP Proxy -> Provide details.
Now go to SDK Manager -> Tools -> Options -> Set provided proxy server and port.
Rebuild your project, you would be prompted with proxy dialog -> Check https proxy and build.
EDIT 1
If above solution does not work. Go to settings -> Search Gradle -> Check offline mode under Global gradle settings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With