解决报错:Could not resolve all dependencies for configuration ‘:app:debugRuntimeClasspath’

一、分析原因

Android Studio经常出现dependencies或者configuing相关错误,这类错误出现的原因一般是Android Gradle Plugin Version、Gradle Version版本与工程文件冲突。

二、解决方法

更改合适的Android Gradle Plugin Version和Gradle Version版本(哪个版本合适,可能需要进行尝试)

三、具体操作

1.通过File—>Project Structure…,进入Project Structure界面

2.在project Structure界面下,选中Project,点击下三角,挑选需要安装的程序版本

然后点击OK,Android Studio会自动对Android Gradle Plugin Version和Gradle Version进行版本更改

注意 :Android Gradle Plugin Version和Gradle Version相匹配版本,参考链接: https://developer.android.com/studio/releases/gradle-plugin?hl=zh-cn

3.重新编译程序,报错应该解决

升级完 Android Studio 3.6.1编译项目 报错 : Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenient Configuration $Artifact Resolve Exception: Could not resolve all artifacts for configuration ‘: classpath ’. 提示错误:Read Time out 即使开了梯子依然下载超时,我们更换为阿里云的maven库,下载速度会更快一点。 将原来配置: repositories { google() 最近因为换了个台式电脑,重新下载了最新的 android studio ,2020年5月6号的3.6.3版本, 结果编译工程和新建工程,都直接就报了以下错误: Could not resolve all dependencies for configuration ‘: classpath ’. Could not resolve com. android .tools.build:gradle:2.1.2. 等6个error 上网百度csdn,结果试下各种方法,依旧没用。 搞了一天,直接说结果,我这边时用户名时中文的原因。我 解决 的办法时重新安装了系统,用户名改成了英文。 以下我总结了: 我 Could not resolve all dependencies for configuration ': classpath '. > Using insecure protocols with repositories, without explicit opt-in, is unsupported. Android Studio 更新3.6.3之后出现Could not resolve all artifacts for configuration ‘: classpath ’.问题你是否和我一样,只因在人群中多看了他一眼?![在这里插入图片描述](https://img-blog.csdnimg.cn/20200507121220467.png)再也没能摆脱**的问题看了很多方法,下载证书,换国产镜像,改本机Host都没能 解决 。那么问题来了,有这么简单的方法要这篇文章干嘛。这篇文章为了 解决 每次创建新项目时都要手动修改配置的麻烦,提供 解决 方法。 你是否和我一样,只因在人群中多看了他一眼? Could not resolve all files for configuration ': app : debug Runtime Classpath '.> Could not find com.google. android .gms:play-services-vision:12.0.1.升级到 Android Sutido 3.0后,跑测之前的Model的main()方法方法时 报错 :Error:... 刚开始学习 android studio ,新建了一个项目,layout中xml文件的design模式一直打不开,显示could not resolve all dependencies for configuration ‘: app : debug runtime classpath ’. 解决 办法: 打开gradle所在目录查看gradle版本,mac用户在Users/[用户名]/.gradle/wr app er/dists目录下 然后回到 android studio , 打开file-project structur 每次拉取其它分支,上图中红框中文件就会消失,启动项目, 报错 : A problem occurred configuring root project 'project_name'. > Could not resolve all dependencies for configuration ': classpath '. > Using insecure protocols with repositories, without explicit opt-in, is unsu... 因为公司项目需要低版本gradle,加上同事其他项目也是需要低版本gradle,要更换gradle,使用2.14.1,于是遇到了如下 报错 ,百度了,很多人都没有直接的办法,直接放弃去找已经下载的使用。看了一篇文章https://www.cnblogs.com/jycboy/p/5819393.html,觉得有用,想了很久(本人比较笨),明白了自己为什么每次更换gradle都栽在这里,“对gradle... Error:Gradle: A problem occurred configuring root project 'MobileShopping'. > Could not resolve all dependencies for configuration ': classpath '.    > Could not resolve com. android .tools.build:gradle 新导入的项目开始时候遇到了这个错误 Error:Could not resolve all dependencies for configuration ': app : debug Runtime Classpath '. Could not determine artifacts for com.facebook.fresco:imagepipeline:0.9.0 Could not get reso... Could not resolve all dependencies for configuration ‘: classpath ’. Could not resolve com. android .tools.build:gradle... 可以尝试 Android Studio 中的File-》Invalidate Cached/Restart 参考https://stackoverflow.com/questions/25994163/could-not- resolve -all- dependencies -for- configuration - classpath