My Android Studio was working fine till morning, but since tonight I get error saying "Gradle sync failed: Connection timed out: connect. If you are behind an HTTP proxy, please configure the proxy settings either in IDE or Gradle.". I am not using any proxy server. Even the option for HTTP proxy is set to "no proxy". I have no idea how to get this working. I tried giving public access to Android Studio in firewall but it didn't work.
Any help/solution is welcome.
P.S. My Android Studio version is 2.2.3
Thank you!
Missing Files: There is a chance of Gradle files getting misplaced. This can be solved by re-installing the required files. Using the Proxy Servers: There was an issue with the syncing of the Gradle when Proxy Servers were turned on. Disabling it can help.
We can configure the settings for how IntelliJ IDEA syncs with Gradle by pressing the settings icon in the Gradle tool window, and selecting Auto-Reload Settings. We can set IntelliJ IDEA to automatically reload the project after "Any changes" in the build script files, so changes are automatically reloaded.
I copied a project that was created else where. After removing these proxy credentials:
systemProp.http.proxyPassword=your_password systemProp.http.proxyHost=host_Ip_address systemProp.http.proxyUser=your_username systemProp.http.proxyPort=port_number
in the gradle.properties, it worked like a charm.
I think it's a network issue. My project currently fails to build unless I pass the --offline argument to gradle. I think the S3 outage is impacting repos hosting dependencies.
Try ./gradlew tasks --offline
Or, to make android studio run in offline mode, follow the instructions: https://stackoverflow.com/a/32173577/1043518
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