类似报错:
could not install gradle distribution from ‘https://services.gradle.org/distributions/gradle-8.8-bin.zip’.
reason: javax.net.ssl.sslexception: unsupported or unrecognized ssl message
could not install gradle distribution from ‘https://services.gradle.org/distributions/gradle-7.2-bin.zip’.
could not install gradle distribution from ‘https://services.gradle.org/distributions/gradle-8.0-bin.zip’.
reason: java.net.sockettimeoutexception: connect timed out
could not install gradle distribution from ‘https://services.gradle.org/distributions/gradle-5.2-bin.zip’.
reason: javax.net.ssl.sslexception: unsupported or unrecognized ssl message
could not install gradle distribution from ‘https://services.gradle.org/distributions/gradle-8.4-bin.zip’.
reason: java.io.eofexception: ssl peer shut down incorrectly
could not install gradle distribution from ‘https://services.gradle.org/distributions/gradle-8.0-bin.zip’.
reason: javax.net.ssl.sslexception: unsupported or unrecognized ssl message
cannot use connection to gradle distribution ‘https://services.gradle.org/distributions/gradle-8.8-bin.zip’ as it has been stopped.
方法一:
1、第一次安装使用android stduio的同学
1、因为是第一次运行项目,所以需要下载gradle,外网下载速度太慢导致失败。我们需要先找到自己的gradle目录,默认是在c:\users\user.gradle\wrapper\dists,这里的user是你自己的用户名。
这次我以gradle8.8演示
2、
点开刚刚不能下载的文件夹,gradle-8.8-bin,里面有一个乱码文件夹,把zip拷贝到这个目录,然后选择解压到当前文件夹
gradle的下载链接(持续更新,缺了或者链接失效请留言):https://pan.quark.cn/s/e0ebef3f302b
之后就可以再次同步
如果还是有问题检查下是否有这个.ok文件,没有就手动改一个,以及可以把.part删掉(删不删都行,看能不能跑)。
ps : 你在网上找到的都是收费的,我的是免费的,这不点个赞支持下良心博主嘛。
方法二:
国内镜像站点提供的解决方案
为了解决gradle下载过慢的问题,我们可以利用国内优秀的镜像站点来加速下载。以下是一些国内镜像站点提供的gradle下载地址:
官网地址:https://services.gradle.org/distributions/
腾讯云镜像 gradle下载地址:https://mirrors.cloud.tencent.com/gradle/
阿里云镜像 gradle下载地址:https://mirrors.aliyun.com/macports/distfiles/gradle/
阿里云镜像 gradle下载地址:https://mirrors.aliyun.com/gradle/
通过使用这些国内镜像站点,我们可以更快地获取gradle的安装包,避免官方下载地址带来的下载速度问题,从而提高我们的开发效率。
发表评论