Original address: http://www.myexception.cn/mobile/1860089.html
Gradlew wrapper use the download to local gradle.zip file installation.
When using Gradlew to build a project, sometimes it is always necessary to download the Gradle-2.2.1-all.zip installation to install. But because Gradle-2.2.1-all.zip is always under the wall. Here's a way to install from the local.
1. Download the Gradle-2.2.1-all.zip package first.
2. Put the downloaded zip package into the {Project.dir}\gradle\wrapper directory (that is, the same directory as gradle-wrapper.properties) to modify {Project.dir}\gradle\wrapper \gradle-wrapper.properties file. As follows:
Reference #wed APR 15:27:10 PDT 2013
Distributionbase=gradle_user_home
Distributionpath=wrapper/dists
Zipstorebase=gradle_user_home
Zipstorepath=wrapper/dists
#distributionUrl =https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
Distributionurl=gradle-2.2.1-all.zip
3. Then run Gradlew build on the line.
4. After installing the Gradle, change the gradle-wrapper.properties back to the right place.
Reference #wed APR 15:27:10 PDT 2013
Distributionbase=gradle_user_home
Distributionpath=wrapper/dists
Zipstorebase=gradle_user_home
Zipstorepath=wrapper/dists
Distributionurl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
#distributionUrl =gradle-2.2.1-all.zip
Another way is to extract the downloaded gradle-2.2.1-all.zip to a directory, then set the path of the Gradle command, and then run the Gradle build on the project directory (note: Gradle instead of Gradlew)
That said, the principle of which everyone should know.
Gradlew wrapper using the download to local gradle.zip file assembly--Go