【问题标题】:build.gradle: How to solve "Unable to resolve dependency for" error?build.gradle:如何解决“无法解决依赖关系”错误?
【发布时间】:2019-02-01 18:06:37
【问题描述】:

我在构建我的应用程序时收到此 gradle 错误:

无法解析 ':app@debug/compileClasspath' 的依赖关系:无法解析 com.squareup.okhttp3:okhttp:3.12.0。

在我的 app.gradle 依赖代码中 here is the image screenshot of the app.gradle file

buildgradle 文件

buildgradle file screenshot

这里是 gradle 文件代码

【问题讨论】:

标签: android build.gradle


【解决方案1】:

您需要将存储库mavenCentral() 添加到allprojectsrepositories

请不要发布 IDE 屏幕截图,因为使用此类输入很痛苦。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2023-02-08
    • 2016-02-16
    • 2017-02-20
    • 2017-05-16
    相关资源
    最近更新 更多