"No cached version... available for offline mode."
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.
With the new Android Studio 3.6 to toggle Gradle's offline mode go to View
> Tool Windows
> Gradle
from the menu bar and toggle the value of Offline Mode that is near the top of the Gradle window.
Please follow below steps :
1.Open Your project.
2.Go to the Left side of the Gradle button.
3.Look at below image.
4.Click button above image show.
5.if this type of view you are not in offline mode.
6.Go to Build and rebuild the project.
All above point is work for me.