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?

1
  • For those who have access to internet on any other device, go to gradle.org/releases and download 'complete' version of the latest build. Extract it to C:/Users/<username>/.gradle/wrapper/dists/ and set its path under Use local Gradle distribution. No need to touch Global Gradle settings. Sep 28, 2019 at 4:07

1 Answer 1

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.