Note: Android Studio needs to download Gradle for the first time when creating a Gradle project , so it starts very slowly ( gradle-bin about more than 30 megabytes), So we should help him download it beforehand.
First of all, we downloaded the good gradle - version number -bin (|all). zip where should I put it. Gradle has a user home , the default is C:\Users\ "Your current user name" \.gradle .
There are four sub-folders under this directory, which we want to put in
Wrapper\dists \[gradle- version number -bin|all ]\[a series of messy character folders ]\ |
。 For example, I put gradle -bin and Gradle-all (only need to put one, all , have source code, documents, etc.), respectively put in the
c:\users\leo \.gradle\wrapper\dists\ GRADLE-1.10-ALL\6VPVHQU0EFS1FQMQR2DECQ1V12 c:\users\ leo \.gradle\wrapper\ DISTS\GRADLE-1.10-BIN\6VPVHQU0EFS1FQMQR2DECQ1V12 |
Two directories below. Then start android Studio and he will automatically unzip the installation (and prioritize the decompression of Gradle-1.10-all, because the bin that I found did not unzip him). As for this garbled folder directory (above the 6vpvhqu0efs1fqmqr2decq1v12 ), my processing is to open the Android Studio first , and then close, this directory is generated (note that This directory will be reborn as a random code folder every time you find a new version that needs to be downloaded, so don't try to put the zip file in the last random code directory you generated.
In addition, you want to know which version of your Gradle project you are using (and also the distinction between all and bin), just look under the project root directory for gradle/wrapper/ Gradle-wrapper.properties this file, which is the corresponding version number (Android Studio will be under this), such as the contents of the file as follows:
#Thu Mar 19:47:09 GMT 2014 Distributionbase=gradle_user_home Distributionpath=wrapper/dists Zipstorebase=gradle_user_home Zipstorepath=wrapper/dists Distributionurl=http\://services.gradle.org/distributions/gradle-1.10-all.zip |
Then you have to be ready to download Gradle-1.10-all.zip to the above folder (the next gradle-1.10-bin.zip is not working)
This method is not a bad test, absolutely no need to wait, and so he downloaded the estimated time to nearly one hours (think I was open. Gradle under the folder, watching gradle**.zip a little download done, slow to death. If you want to verify that the above method has not succeeded, you will go to. gradle/wrapper/dist/gradle-1.10-all/garbled folder/below wait, see he will not automatically decompression, as long as the solution pressure, the explanation is no problem!
Android Studio first time new Android Gradle Project super Slow Solution