且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

无法解决 android studio 3.0.1 中的所有依赖项

更新时间:2022-12-12 21:57:26

我在将 AS 更新到 3.1.3 后遇到了同样的问题我的问题:

I have same issue after updating AS to 3.1.3 Issues with me:

我在同步 gradle 时遇到这些错误:-

错误:无法解析:app@debug/compileClasspath"的依赖关系:无法解析 xxx.

Error:Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve xxx.

错误:无法解析:app@debug/compileClasspath"的依赖关系:无法解析 xxx.

Error:Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve xxx.

错误:无法解析:app@debugAndroidTest/compileClasspath"的依赖关系:无法解析 xxx.

Error:Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve xxx.

错误:无法解析:app@releaseUnitTest/compileClasspath"的依赖关系:无法解析 xxx.

Error:Unable to resolve dependency for ':app@releaseUnitTest/compileClasspath': Could not resolve xxx.

错误:无法解析:app@debugAndroidTest/compileClasspath"的依赖关系:无法解析 xxx.

Error:Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve xxx.

解决此问题的解决方案:

1.在 SDK Manager > Appearance & 中检查代理行为 > 系统设置 > HTTP 代理.应检查自动检测代理设置.

1. Check proxy in SDK Manager > Appearance & Behavior > System Settings>HTTP Proxy. Auto-detect proxy settings should be checked.

2.默认设置构建、执行、部署 > 构建工具 > Gradle取消选中离线工作.

2. Default settings Build, Execution, Deployment > Build Tools > Gradle Uncheck Offline work.

3.在左侧面板中选择 Project explorer > Android检查 Gradel 脚本目录.寻找 cradle.properties(全局属性)它包含代理添加的属性,请对所有属性进行评论.

3. In left side panel select Project explorer > Android Check Gradel Scripts dir. look for cradle.properties (Global Properties) It contains proxy added properties please do commented all of them.

尝试清理和构建.

现在检查所有依赖项是否解决.

Now check all dependencies resolve.