1、出现【Error:Connection timed out: connect. If you are behind an HTTP proxy, please configure the proxy settings either in IDE or Gradle.】,或者出现【Received close_notify during handshake】都是gradle下载不成功。
解决方式一:在gradle官网下载对应版本的gradle,然后把下载包放置在对应的路径。
解决方式二:在build.gradle中添加两句,重构一下:【使用国内阿里云镜像服务器下载的意思】
maven { url ‘http://maven.aliyun.com/nexus/content/groups/public/’ }
maven{ url ‘http://maven.aliyun.com/nexus/content/repositories/jcenter’}
放置位置如下图所示:

本文介绍了当在导入他人项目时遇到Gradle下载失败的两种常见错误:连接超时和握手关闭通知。提供了两种解决方案,一是手动下载并放置对应版本的Gradle,二是通过在build.gradle文件中添加阿里云镜像服务器地址来改善下载效率。
3553

被折叠的 条评论
为什么被折叠?



