It is the first time to use AS to write Android, the problem that is easy to encounter Could not install Gradle distribution from 'https://services.gradle.org/distributions/gradle-6.7.1-bin.zip'.
The reason is that in general https: //services.gradle.org/distributions/gradle-6.7.1-bin.zip The resources downloaded are very slow and the download fails. The solution is as follows:
1. Open the location of gradle, the default location is C:\Users\username .gradle\wrapper\dists, according to the required gradle version number, check whether it is in the location of gradle.
If not, download it. Here are two versions of 6.7.1: bin , all , and then decompress a copy. Do not delete the zip file , other versions can be downloaded from the gradle official website.
2. Switch Android to project
3. Open gradle->wrapper->gradle-wrapper.properties, and modify the distributionUrl in it to
file:///C:/Users/用户名/.gradle/wrapper/dists/gradle-6.7.1-bin.zip
4. Open file->setting, search for gradle, change Use Gradle from to Specified location, and put the decompression address of the file set above into it 5. Click
sync
6. The problem is solved, the .gradle folder appears, and the upper right corner can run