Android Studio import project keeps showing that Gradle project is being downloaded

As the title states, the problem diagram is similar to the following:

(This picture was taken after the problem was solved. I didn’t take a screenshot when I encountered the problem before)

Solution

First find out which version of gradle you are downloading

and then in the link

​​​​​​Gradle Distributions

Find your version of gradle and download the corresponding file with the suffix bin

For example, my version is 8.0, and this is the file I downloaded.

Then find the corresponding location on the computer C:\Users\username\.gradle\wrapper\dists and there is this file.

If not, download the above , then unzip the .zip and copy it to the location C:\Users\username\.gradle\wrapper\dists (the username is your own username, do not copy the link directly)

This is what it looks like after opening the folder

Open the garbled file (the first folder) and delete it (it should be the 8.0 part, because I have already deleted it, so I can only take screenshots of another version)

this file

If there is no garbled folder, try opening Android studio and repeating sync.

After deletion, copy the original .zip compressed file to the garbled folder.

Then restart Android studio and try to sync again . You will find that it is different from the original. Android studio needs to download some files, so it will take a while before it can be used normally.

Guess you like

Origin blog.csdn.net/qq_34168477/article/details/134671891