Gradle无法下载okhttp.jar(com.squareup.okhttp3:okhttp:3.8.0) [英] Gradle Could not download okhttp.jar (com.squareup.okhttp3:okhttp:3.8.0)
问题描述
我正在尝试使用 pesapal <向我的应用添加付款/a>,但有一个问题,我将其依赖项实现'com.pesapal.android:pesapalandroid:1.0.5'
添加到我的应用中,自从我成为
I am trying to add payments to my app with the use of pesapal but having a problem, I added their dependency implementation 'com.pesapal.android:pesapalandroid:1.0.5'
to my app and ever since I have been the
ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not download okhttp.jar (com.squareup.okhttp3:okhttp:3.8.0)
我尝试使用Google,并在此处找到了Maven库但我不知道如何将Maven路径添加到我的顶级Gradle中.
I tried using google and was let to this question on stack overflow but to no avail, I have found the library Maven here but I do not know how to add that maven path to my top level gradle.
推荐答案
您可以像这样添加它
implementation group: 'com.squareup.okhttp3', name: 'okhttp', version: '3.8.0'
并要从maven获取依赖项,您需要将此添加到存储库中
and to get dependencies from maven you need to add this to your repositories
repositories {
mavenCentral()
}
这篇关于Gradle无法下载okhttp.jar(com.squareup.okhttp3:okhttp:3.8.0)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!