Reputation: 330
I have been endlessly searching the internet and reviewing some questions here for the entire past week since I decided to move to Android Studio
I really dont understand why you have to be online at least once in order to build a project in Android Studio What was so special in Eclipse that it was able to do all the compiling offline and the supposedly better build system (gradle) can't.
Up to now I still dont understand all this fuss I see about gradle, what is it exactly that gradle fetches online when I have all the necessary files required to build my project in my computer?.
This is really frustrating me as I don't guarantee myself to always have internet access
Upvotes: 4
Views: 2143
Reputation: 28126
First of all, Gradle has a local cache to store downloaded dependencies. If your new project requires some dependency, which was already used by some other project and stored in cache, then no need to download them again.
The second, why you may need to have an internet connection, is the ability to use on-line repositories, like Maven Central. You don't need to dowload all the jars manually and add them under your application's classpath and then manage it's transitive dependencies. All it's done by Gradle. Sure, Gradle let you provide local dependencies, if you need it, just rely on it as on files in your local filesystem. By the way, you may not specify exactly version of some dependency, but, for example, the latest one (that's called "dynamic version" and could be usefull during development). In that case, Gradle will check, whether the newer version is available and download it automatically.
And the last, if you still need it, you are free to make it running in offline mode.
Upvotes: 4
Reputation: 6918
It doesn't need internet connection to built your every project.
If you add additional library dependencies which needs to be downloaded, then it does require internet connection
Gradle is one of the best out there, and open source!
And you can though switch between online and offline. Android Studio helps to do that with ease
Upvotes: 4