avirk
avirk

Reputation: 3086

How do I set up Android Studio to work completely offline?

I have very slow bandwidth, so I'm trying to keep all the required files on the local machine to work with Android Studio completely offline. When I click on "New Project" it always tries to download a file named gradle-1.6-bin.zip which I downloaded and tried to install locally via the plugin manager but it gives me an error:

fail to load plugin descriptor from file gradle-1.6-bin.zip

So what other files do I need to download and how do I install them properly to work offline with Android Studio?

Upvotes: 76

Views: 163624

Answers (13)

Amal Dev S I
Amal Dev S I

Reputation: 958

For enabling Offline mode Android Studio Version Above 3.6, refer the following answer.

https://stackoverflow.com/a/64180290/4324288

Upvotes: 2

Wajid
Wajid

Reputation: 2341

Android Studio Version < 3.6:

For Windows:

File -> Settings ->Build, Execution,Deployment -> Build Tools -> Gradle

For Mac OS:

Preferences ->Build, Execution,Deployment -> Build Tools -> Gradle

Check/UnCheck Offline work checkbox as per your need.

Android Studio Version >= 3.6:

follow steps in the image:

enter image description here

Upvotes: 22

jimonstack
jimonstack

Reputation: 81

for a complete offline android studio 3.5.0 installation - you need to download all these below components

android studio, gradle, android gradle plugin and sdk.

here is a detailed step by step Stackoverflow answer for the question

how to install android studio full offline

Upvotes: 1

avirk
avirk

Reputation: 3086

OK guys I finally overcame this problem. Here is the solution:

  1. Download gradle-1.6-bin.zip for offline use.

  2. Paste it in the C:\Users\username\.gradle directory.

  3. Open Android Studio and click on the "Create New Project" option and you will not get this error any more while offline.

    You might get some other errors like this:

    Don't worry, just ignore it. Your project has been created.

  4. So now click on "Import Project" and go to the path C:\Users\username\AndroidStudioProjects and open your project and you are done.

Upvotes: 13

user238638
user238638

Reputation:

I'm using Android Studio 0.5.4 (Mavericks).

Preferences → Gradle → Global Gradle Settings → Offline work

Upvotes: 20

bkurzius
bkurzius

Reputation: 4068

Android Studio 0.4.0 now includes support for offline:

http://tools.android.com/recent/androidstudio040released

"You can now open the Compiler > Gradle options and enable Offline mode, which will tell Gradle to ignore update-to-date checks"

Updated Nov 2018: Now you can Open preferences, then search for "offline" and in the results select gradle and click "Offline work"

Upvotes: 29

Aman
Aman

Reputation: 2411

File > Settings > Build, Execution, Deployment > Gradle > Offline work

Upvotes: 1

Android Studio 1.3.1 has neither

Gradle > Global Gradle settings > Offline work

nor a

Compiler

menu. To access the compiler menu, go to :

File > Settings > Build, Execution & Deployment > Compiler > Compiler

and de-select Configure on demand

The above still uses data but is faster, I was able to load images and maps. However, in addition, if you want to be completely offline, you need to do the following:

 File -> Settings ->Build, Execution,Deployment -> Build Tools -> Gradle -> 

check Offline work

Click the OK button.

For Android Studio 2.0 it is the same procedure.

Upvotes: 13

Shiv Buyya
Shiv Buyya

Reputation: 4130

You can enable from File->Build, Execution, Deployment->Build Tools-> Gradle-> Offline Work.

Upvotes: 1

Eric Labelle
Eric Labelle

Reputation: 1967

Not sure if it was removed before, I heard it was kinda buggy in 0.5.8 but in AS 0.5.9 the settings is there:

Gradle > Global Gradle settings > Offline work

Upvotes: 3

Richard
Richard

Reputation: 61379

It seems as though gradle was not installed for me. Going to Android/Sdk/tools/templates/gradle/wrapper and running ./gradlew tasks --debug has resulted in it downloading.

Upvotes: 0

Genma
Genma

Reputation: 1541

On Android 0.5.1 you can find the offline option in the File / Settings / Gradle (in the Project Settings section)/ Offline work

Upvotes: 3

m12lrpv
m12lrpv

Reputation: 1287

Just as an assist if you go with Android Studio 0.4.x offline mode (because this thread is one of the main ones that google throws up when querying this issue).

From Alex Ruiz (Google+):

If you specify dependency versions using "+" (e.g. 0.8.+) Gradle (not Android Studio) will check that you have the latest version of such dependency periodically (every 24 hours,) even in offline mode

You need to take the plus out.

Upvotes: 3

Related Questions