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, p
I got the very same problem.
In my case, I started my android project on campus. Everything was fine then. When came home and started using the wifi I got the same problem (Gradle sync failed: Connection timed out).
All did is modify gradle.properties file under Gradle Scripts. I just removed the proxy settings that were stored in that file. Everything's back to normal now.
Below is an image of where to find the file: