Ketan Ramteke
Ketan Ramteke

Reputation: 10675

Is it possible to make android studio 3+ run offline?

I am new to Android development and have poor internet connection at home, whenever I create a new android project it takes forever to sync and build and most of the times it fails to build at all, I was wondering if there is a way so that I can download and save all the necessary build files like gradle, builder jar etc and use them to make android studio work offline?

Thank you and have great day.

Upvotes: 0

Views: 839

Answers (2)

OneCricketeer
OneCricketeer

Reputation: 191844

I would suggest at least installing Gradle separately, and configuring projects not to download and use the Gradle wrapper for every new project.

After Android Studio downloads all the other libraries for the first time, then you can turn on offline mode in the IDE, and those packages will be shared for all projects

As soon as you try to use a new library, though, you need to get back online

Upvotes: 2

Show Young Soyinka
Show Young Soyinka

Reputation: 552

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.

For more info, visit https://developer.android.com/studio/build/optimize-your-build

Upvotes: 1

Related Questions