Raulp
Raulp

Reputation: 8176

What or where is "Disable Gradle offline mode" in Android Studio?

I am using Android Studio version 4.1, and behind a proxy. I have already setup Proxy settings and the SDK download works fine.

But when I create a new Project, it's throwing error, like:

Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.1.0/gradle-4.1.0.pom'. Received status code 407 from server: Proxy Authentication Required

Disable Gradle 'offline mode' and sync project

Where the last line of above (the "Disable...") is blue, like a URL, hence I simply clicked the URL, but then the same error keeps coming.

On searching for "offline" in the settings, I find below snapshot:

Gradle Offline settings not there in the Android Studio Settings

I remember finding Gradle's "offline" mode easily using search in settings (in older Android Studio versions);

Where can these be found in the latest Android Studio???

Upvotes: 15

Views: 33891

Answers (5)

Run dependencies.

enter image description here


Now wait for the gradle project sync.

Upvotes: 1

Umair Iqbal
Umair Iqbal

Reputation: 2069

If you want to disable/enable Gradle offline mode:

  • Click on the Gradle tab (from the right side of your Android Studio)
  • Select/Unselect the 4th option in the Gradle toolbar.

enter image description here

Upvotes: 81

Surendra Naidu Karna
Surendra Naidu Karna

Reputation: 49

enter image description here

If we enable Offline Mode, Gradle won't fetch dependencies it will try to fetch from Cache. In Latest Android Studio the option moved to Gradle in dashboard itself.

Upvotes: 1

Ishita Pandey
Ishita Pandey

Reputation: 51

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..

Head over here for more.

Upvotes: 4

Ahmad Sattout
Ahmad Sattout

Reputation: 2476

Gradle Offline Mode is when Gradle uses the already downloaded dependencies and Gradle Wrapper that are cached on your system.

View Offline Inspection Results is tied to Inspections, nothing to do with Gradle. It is used when you want to run Inspections offline, which I don't think ever matters, since I've never used that setting

Upvotes: 1

Related Questions