Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does "Offline work" make Gradle Build Running faster in Android Studio?

From answer https://stackoverflow.com/a/35859572/5835947 we know that "Offline work" really helps a lot when you face the problem that Android Studio builds app too slow. As an extension, Why does "Offline work" make Gradle Build Running faster in Android Studio? Is it because Android Studio will download files from internet every time I rebuild the application when Android Studio is in "Online work" mode? If so, Why put "online work" as the default action? It doesn't seem wise at all.

like image 916
guo Avatar asked Jul 22 '16 10:07

guo


1 Answers

If you are "offline", you don't download libraries from Internet and get your build faster. But if you add a new dependency and work still offline, you don't get this library.

With other words: after every new dependency go online and build gradle to download new library. After that you can go offline and build your project faster.

The same thing is if you want to update the library to new Version.

like image 181
Alexander Tumanin Avatar answered Oct 23 '22 02:10

Alexander Tumanin