Created new Android Studio project. But Gradle Sync never ends:
Gradle Sync: Wait for the other thread to finish acquiring the distribution
I have checked Android Studio does not download data:
I have checked internet connection, it is working but it is slow.
Is this because of a slow internet connection? If no, how to solve this problem?
I also met this problem. Then I found out that this is due to the gradle of the project dependency is not downloaded.
Ways to verify the problem:
Check if there is a gradle file in the directory.
Linux:~/.gradle/wrapper/dists
Windows:C:\users\{user name}\.gradle\wrapper\dists
If the file does not exist in the directory, Then this is what led.
Ways to resolve the problem:
wo need to download the configuration file manually.
Download the file(gradle) form https://services.gradle.org/distributions/ according to the distributionUrl
in the gradle-wrapper.properties
, infact You can modify it according to your needs.
For example, in my gradle-wrapper.properties
, distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
. So I should download the filegradle-5.1.1-all.zip
move the file(gradle-5.1.1-all.zip) you downloaded to the deepest part of above directory.
For example, in my pc, its final position is C:\Users\ufan0\.gradle\wrapper\dists\gradle-5.1.1-all\97z1ksx6lirer3kbvdnh7jtjg
.
note: There will be undownloaded files in C:\Users\ufan0\.gradle\wrapper\dists\gradle-5.1.1-all\97z1ksx6lirer3kbvdnh7jtjg
when you check there first, you can delete them, then move the zip of gradle to there.
Now you can restart the Android Studio, then choose File -> Sync Project With Gradle Files
.
When these are all done, The Android Studio should be able to work properly.
note: In order to avoid this type of situation the next time, you can choose to configure the Setting -> Gradle -> Use local gradle distribution
.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments