1

I am on a slow internet connection and would like to use downloaded Gradle wherever possible rather than AS downloading it every time I build.

Now how do I setup AS for that?

Abhishek Kumar
  • 121
  • 1
  • 1
  • 3
  • For those who have access to internet on any other device, go to https://gradle.org/releases/ and download 'complete' version of the latest build. Extract it to **C:/Users//.gradle/wrapper/dists/** and set its path under **Use local Gradle distribution**. No need to touch **Global Gradle settings**. – Abhishek Kumar Sep 28 '19 at 04:07

1 Answers1

1

Hi welcome to stackoverflow, enjoy your stay.

To enable offline mode you can follow this steps:

Enable offline mode

If you are on a slow network connection, your build times may suffer when Gradle attempts to use network resources to resolve dependencies. You can tell Gradle to avoid using network resources by using only the artifacts that it has cached locally.

To use Gradle offline when building with Android Studio, proceed as follows:

Open the Preferences window by clicking File > Settings (on Mac, Android Studio > Preferences). In the left pane, click Build, Execution, Deployment > Gradle. Check the Offline work checkbox. Click Apply or OK.

If you're building from the command line, pass the --offline option.

As shown here Optimize your build speed

Quimbo
  • 634
  • 6
  • 17