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?
Gradle download in Android takes forever. The download is about 50MB, but Android Studio is still busy - 3 hours!!
Just you have to do >> open File --> Sync Project with Gradle Files and then after >> open File --> invalidate Android Studio caches / restart so done this problem.:) Show activity on this post.
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
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With