Had the same error after updating Android Studio today. For me, it wasn’t a matter of proxy settings:
-
Uncheck “Offline work” in Android Studio 0.6.0:
File->Settings->Gradle->Global Gradle Settings
or in OSX:
Preferences->Gradle->Global Gradle Setting
or in more recent versions:
File->Settings->Build, Execution, Deployment->Build tools->Gradle
-
Resync the project, for example by restarting the Android Studio
- Once synced, you can check the option again to work offline.
(Only tested in Gradle version 0.11… and Android Studio version 0.6.0 Preview)
EDIT : Added paths for different versions/platforms (as mentioned by John Ballinger and The_Martian). Not yet verified.