I have been having internet issues, so installing gradle for android studio has been a big issue, so I downloaded the zip file. However, I dont know how to install it offline and set Android studio to use the offline version. I need help.
-
which android studio version u can use ? – Ali May 11 '18 at 11:38
-
Android studio 3 – David Essien May 11 '18 at 12:36
-
ok then follow my answer.. and if you have any query then ask me. :) @DavidEssien – Ali May 11 '18 at 12:40
3 Answers
1st open below link and download the latest
complete
version of Gradle
Now you find your path where your android studio install
then Find .gradle folder, normally gradle is present here...
C:\Users\**YourAccountFolder**\.gradle\wrapper\dists\
Now paste your .zip file in dists folder and Extract.
Now open android Studio Go to
File > Settings > Build, Execute, Deployment > Gradle >
Now in Dialog select Use Local gradle distribution and paste path of your folder where extract .zip file.
then apply and OK
now you can update your gradle(app)
And Go to file, setting same as like above path and in dialog SELECT Offline work
Apply and Ok.

- 605
- 2
- 7
- 16

- 3,346
- 4
- 21
- 56
-
2I have done all this android studio is still going online to check for gradle and when I turn off the internet, it comes up with an error. The problem is that even online, the download is never successful – David Essien May 11 '18 at 13:08
-
2
-
3set your service directory path like : **home/davldshare/.gradle** @DavidEssien – Ali May 11 '18 at 13:21
-
here is the error it produces: "Gradle sync failed: Could not download gradle-core.jar (com.android.tools.build:gradle-core:3.1.2): No cached version available for offline mode Consult IDE log for more details (Help | Show Log) (46s 480ms)" – David Essien May 11 '18 at 13:57
-
6so Go to the settings and unchecked **Offline Mode** and sync gradle or run project for 1st time if is successfully run then you can go in settings and checked **Offline Mode** @DavidEssien – Ali May 11 '18 at 15:44
-
3Thanks @Mohammad. That's what I'm doing now. Just that internet service here is terrible. It keeps stopping half way. That's why I was particular about offline. I'm hoping it works. – David Essien May 11 '18 at 15:48
-
1look only unchecked offline mode nothing to change other settings @DavidEssien – Ali May 11 '18 at 15:50
- Download gradle zip file
- Open the
gradle-wrapper.properties
file from your android project, path specified below
my-app\gradle\wrapper\gradle-wrapper.properties
- Set the
distributionUrl
to point to the download zip location, for example
distributionUrl=file:///C:/Users/username/Downloads/Compressed/gradle-4.10.2-all.zip
Done!
Now build the project and Android Studio will install the gradle.

- 11,938
- 19
- 92
- 127
In June 2021 im using Android Studio 4.2.1 and I could enable gradle offline mode using the method outlined in the docs below.
https://developer.android.com/studio/releases#3.6-gradle-offline-ui

- 56
- 4