Problem
The first loading of the project is very slow and always shows Building "XXXX" Gradle project info
Reason
AS project judges which Gradle version to use according to the file under
{your project}/gradle/wrapper/gradle-wrapper.properties #Thu Jan 12 21:17: 24 CST 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-x.xx-all 1 2 3 4 5 6 distributionUrl to judge When the AS opens the project for the first time, it will first read the gradle-wrapper.properties file, so as to know which version of Gradle this project needs, and then go to the GRADLE_USER_HOME folder to find out whether this version of gradle exists. If it does not exist, go to distributionUrl to download Gradle save location
Linux:~/.gradle/wrapper/dists
windows:C:\users\{user name}\.gradle\wrapper\dists
1
2Solution 1: Wait for
the download to complete (it can be downloaded without overturning the wall, but it will be very slow) method Two: The following steps will cause problems: 1. Find the gradle-wrapper.properties file in the runnable project 2. Copy the entire distributionUrl line 3. Open the gradle-wrapper.properties of the project to be imported and replace the copied content with the desired The distributionUrl line of the imported project 4. Restart as, and import the project. 1 2 3 4 Method 3: Go to https://services.gradle.org/distributions/ to download the corresponding version of Gradle (official website address https:// gradle.org/install) End
Reasons and solutions for AndroidStudio Gradle loading project too long
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=326102582&siteId=291194637
Recommended
Ranking