android studio imports other people's projects or the Gradle version does not match and cannot be downloaded after the update

The error occurs when the gradle.zip file is being downloaded in the process of building Gradle. It is estimated that the access address is blocked and the file cannot be downloaded.

1. Find the .gradle of the project you downloaded in the project directory, and check the gradle version in the directory, as shown in Figure 4.1.

2. Manually download the gradle.zip file used by your project

     You can go to the following URL (note to download the compressed package at the end of all):

    http://services.gradle.org/distributions

    Find the corresponding version and download it, or download it directly from the website http://downloads.gradle.org/distributions/gradle-xx-all.zip.

3. Copy the downloaded file directly to a subdirectory of a random string in the     C:\Users\Administrator (your username)\.gradle\wrapper\dists\gradle-xx-all\ directory , click Android Studio toolbar "Sync Project Gradle Files" or restart Android Studio, the problem can be solved.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325846412&siteId=291194637