Quick solution to the problem of gradle download failure

preface

Every time we build an android development environment in a new environment and try to run it, or when we change the gradle version, there will always be a long... Long... Long process of downloading gradle.

What should I do? Why don't you go to sleep first?

In fact, there are two solutions.

1、 Use an existing gradle version

Open the directory ~ /. Gradle / wrapper / dists to see what version of gradle has been downloaded

Modify the gradle / wrapper / gradle-wrapper.properties file of the project

Re open Android studio or re run assembly.

2、 Download gradle manually

If it is a completely new environment and there is no downloaded version of gradle, or the specified version of gradle must be used

Then we can directly use Xunlei and other download tools to download, which will be much faster.

After downloading, move the zip file to the specified version directory of gradle.

It is explained here that the above is only applicable to Linux and MAC platforms.     

Where is windows? Change the system quickly (solve it by yourself. Windows has a similar directory).

Another point is that 55gk2rcmfc6p2dg9u9ohc3hw9 everyone in the middle is different, which is randomly generated.

Next, when we re execute the assemble command, we will find that we have directly skipped the original download phase and directly decompressed the gradle-3-3.zip file we just downloaded.

Quick fix for failure to download gradle

summary

The above is the whole content of this article. I hope the content of this article can bring some help to Android developers. If you have any questions, you can leave a message. Thank you for your support for programming tips.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>