Table of contents
Problem Description
Android studio version: 3.5.2
After the project is created, it will automatically sync gradle, as shown in the following figure:
Sometimes it will fail to sync successfully for a long time (I waited for more than an hour without success)
Or directly report an error sync failed:
This situation may be caused by the direct sync download speed being too slow
problem solved
The download speed in the studio is too slow, so we choose to download it in the browser and configure it manually:
Proceed as follows:
① gradle.properties
Find the gradle version that needs to be downloaded in
Copy the URL to the browser to download the compressed package
②Find C:\Users\dell.gradle\wrapper\dists
the folder:
(This is the path of my Dell computer, the specific path needs to be determined according to individual circumstances)
If you have downloaded the relevant gradle in the studio, then the dists folder should not be empty. Let’s clear the dists, and then unzip the compressed package downloaded in step ① to dists:
The specific content of the file is shown in the figure below:
③ Go to the studio, File->Settings->Gradle
Choose to use the local gradle and configure the relevant path
④ Click File to manually synchronize:
If there is no accident, the build will be successful: