9

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?

Suzan Cioc
  • 29,281
  • 63
  • 213
  • 385

1 Answers1

8

Option 1. If you have possibility go online temporary

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

Option 2. Download distribution by hand

Or, alternatively, you could download distribution from official site. Then extract it, add gradle to PATH variable, and run:

gradle build --offline
Vyacheslav Shvets
  • 1,735
  • 14
  • 23