I am trying to run gradlew on offline machine. It starts from message
Downloading https://services.gradle.org/distributions/gradle-2.10-all.zip
and then fails with exception.
What it wants and how to satisfy it?
It uses much of internet bandwidth and takes time to import or create a project.
No need to install gradle locally The gradlew script doesn't rely on a local Gradle installation. It goes and fetches a Gradle installation from the internet the first time it runs on your local machine, and caches it. This makes it super-easy for anybody anywhere to clone a project and build it.
Enable offline mode in Android Studio to disable checking for updates everytime. Go to Settings>Compiler>Gradle>Offline mode. If this is enabled the gradle will be told not to connect to internet and check for updates.
Overview. Gradle is commonly used by developers to manage their project's build lifecycle. It's the default choice of build tool for all new Android projects.
Command gradlew
means you are trying to use Gradle Wrapper. It is a tool for automated downloading of Gradle distribution.
In order to download Gradle Wrapper you have to execute gradlew
command with a proper network connection at least once.
Make sure you have correct network and proxy settings.
./gradlew build
Only after that you can build a project offline. Example:
./gradlew build --offline
Or, alternatively, you could download distribution from official site. Then extract it, add gradle
to PATH
variable, and run:
gradle build --offline
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With