Could not install Gradle distribution from ‘https://services.gradle.org/distributions/gradle-6.5-bin

问题描述

在AndroidStudio运行时,突然报错,提示gradle无法下载,报错信息为

Could not install Gradle distribution from 'https://services.gradle.org/distributions/gradle-6.5-bin.zip' 

如下图所示:

Could not install Gradle distribution from ‘https://services.gradle.org/distributions/gradle-6.5-bin_第1张图片

问题分析

(1)网络问题导致gradle没下载完整。(手机限流流量开的热点以及不能访问外网的网络(校园网))

(2)原有的.gradle与现有项目的.gradle不匹配

问题解决

1. 假若你有这个gradle,并且gradle里面的内容是完整的,刷新即可,也可以先重启再刷新,但一般也是没有才会出现这个问题,看方法2

 刷新方法  (setting->Sync Project with Gradle Files) 

2.也可以选择手动下载相应的gradle版本,然后解压放到本地的gradle缓存目录(C:\Users\Administrator\.gradle\wrapper)

下载地址:https://blog.csdn.net/JiYaRuo/article/details/135253198?csdn_share_tail=%7B%22type%22%3A%22blog%22%2C%22rType%22%3A%22article%22%2C%22rId%22%3A%22135253198%22%2C%22source%22%3A%22JiYaRuo%22%7D

下载后解压放在wrapper目录下,然后重启androidtudio,或者刷新即可

 Could not install Gradle distribution from ‘https://services.gradle.org/distributions/gradle-6.5-bin_第2张图片

你可能感兴趣的:(Bug记录,androidStudio,android,错误提示,gradle)