Cannot enable Gradle's offline mode on Android Studio 3.6
Asked Answered
A

10

77

I'm using the new Android Studio 3.6 Canary 9 to test new functionalities, and I cannot enable Gradle's offline mode.

enter image description here

In Android Studio Preferences window, tab Gradle, I cannot find the entry point to enable it. Is this a bug or Google has disabled Gradle's offline mode?

Note that --offline option is still working when using command line.

Author answered 5/9, 2019 at 2:44 Comment(0)
P
208

From the Android Studio 3.6 new features blog post:

New location to toggle Gradle's offline mode 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 Gradle offline button in the Gradle panel..

Here is the link

Prosecutor answered 5/9, 2019 at 3:41 Comment(6)
But this new entry point is bad compared to the old checkbox. It does not explicit showing that the "offline mode" is enabled or not. The highlight state is enabled, isn't it? – Author
True stable recently. I am not able to figure it out. – Tor
I set it to offline mode and restarted and sync gradle again but I am still getting the errors mentioned in this question: #60393727 please help. – Antionetteantioxidant
To all the confused souls. It is offline mode when the toggle button is highlighted. 😘 – Canyon
Poor UX design. Developers are in confusion while the pressed state is online or offline. – Gearing
Many thanks for the information of the new location of the offline mode. In my case though it does not help. The only guarantee to speed up gradle is to turn off wifi. A little disappointing matter. – Conchiolin
U
50

To enable or disable Gradle's offline mode, select View > Tool Windows > Gradle from the menu bar and near the top of the Gradle window, click Toggle Offline Mode Gradle enter image description here

Ulita answered 5/10, 2019 at 5:48 Comment(5)
I believe many will not understand what this icon mean poor icon UX here – Tor
you can always use material design plugin it appears as a wifi icon – Butchery
So when is offline mode enabled? When highlighted not when not highlighted? I'm confused – Beitnes
this is a very hard button to find. if it wasn't for this post I wouldn't have found the button – Kukri
Very poor UX design. Developers are in confusion that the pressed state is offline or online. – Gearing
C
36

To clarify it. In your Android Studio...

View > Tool Windows > Gradle

And then this...

enter image description here

And this...

enter image description here

Canyon answered 15/3, 2020 at 8:29 Comment(0)
E
6

Many people have given correct answer, I am just adding pictures relevant to Android Studio 3.6.2. When I upgraded to Android Studio 3.6.2 I kept getting error while doing build that 'Gradle was in offline mode' but under File>Settings>Gradle> I could not see the option to switchoff Gradle offline mode. So I did a fresh install of Android Studio 3.6.2 and I continued to get the same problem. After checking various answers I found that the placement of Gradle offline switch has changed & you can do the switch in Gradle panel as per the 2nd image below.

Image1-Android Studio3.6.2 does not have Gradle Offline Switch in this location Image2- enter image description here

Earnest answered 3/4, 2020 at 18:28 Comment(0)
B
3

Please follow below steps : 1.Open Your project. 2.Go to the Left side of the Gradle button. 3. enter image description here 4.Click button above image show . 5. if this type of view you are not in offline mode. 6. Go to Build and rebucild the project.

All above point is work for me.

Bernstein answered 3/4, 2020 at 12:42 Comment(0)
T
2

enter image description here To enable offline mode you can follow below steps:

1. Click "Gradle" on the right corner
2. Click button "Toggle offline mode" to disable
Theran answered 5/3, 2020 at 0:0 Comment(0)
C
2

For Flutter Projects

You WON'T find this option (View > Tool Windows > Gradle)

enter image description here

Spent hours trying to find it.

You have to open your Android project in another Android Studio window.

Go to Open and select the Android project:

enter image description here

When the new window opens, follow the recommended step and voila:

enter image description here

You can now find the Gradle view window to the right.

When working with Flutter, this is how you make Gradle specific changes.

Chamfron answered 15/7, 2020 at 10:14 Comment(0)
I
1

Oh in the last release of the android studio the location of the offline mode option has changed!

But it is so easy to just click on Gradle on the right side of the android studio or (go to View > Tools windows and select Gradle! )

and Like a photo Turn on or Turn off the Wifi Icon :

enter image description here

Isis answered 1/3, 2020 at 13:48 Comment(2)
Which version of Android Studio that you are using? It's strange – Author
3.6! stable channel! I have Material theme On my android studio youtube.com/… – Isis
I
0

In Android Studio 3.6, You can toggle Gradle from offline to online mode (See screenshotenter image description here) and hit Gradle sync. This solved my issue.

Interrelate answered 24/3, 2020 at 13:27 Comment(0)
D
-1

After Update Go To File >> Project Structure >> Suggestions and on the Right side pane Click update

Deanery answered 2/3, 2020 at 8:33 Comment(0)

© 2022 - 2024 β€” McMap. All rights reserved.