2

I haven't used Android Studio in a while, but decided to update everything and create a new project and I get the above error, if I go to Preferences -> Build, Execution, Deployment -> Gradle.

There's no option to 'Work Offline' as suggested here among other places No cached version of gradle available for offline mode

I've also used the 'Command Shift A' and searched for 'Offline' and I get nothing. Anyway to disable this?

Spider
  • 431
  • 7
  • 21

4 Answers4

12

To Enable or Disable Gradle Offline Mode In Android Studio 3.6.1 please see in picture below : enter image description here

or 

Try View ➡️ Tool Windows ➡️ Gradle from the menu bar. Then, near the top of the Gradle window, click Toggle Offline Mode

or 

If you want demo video so please have a look on : https://www.youtube.com/watch?v=50WxM7mu6pg

Mujahid Khan
  • 1,712
  • 1
  • 18
  • 24
9

As per the Android Studio 3.6 release notes:

To enable or disable Gradle's offline mode, first select View > Tool Windows > Gradle from the menu bar. Then, near the top of the Gradle window, click Toggle Offline Mode

ianhanniballake
  • 191,609
  • 30
  • 470
  • 443
5

To enable or disable Gradle's offline mode, View > Tool Windows > Gradle from the menu bar. Then, near the top of the Gradle window, click Toggle Offline Mode

you can also watch this video https://youtu.be/lbCM8N8ItRI

SAKhan
  • 249
  • 4
  • 16
2

The toggle button always says - 'Toggle Offline Mode' and never changes to 'Toggle Online Mode' How will I know whether gradle sync will run in offline mode or online mode?

  • If toggle button is in normal state - offline mode is disabled, otherwise (if button is highlighted) - offline mode is enabled. – Myroslav Jun 04 '21 at 19:35