Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/185.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 错误:无法解析';的依赖项:app@debug/compileClasspath';:无法下载okhttp.jar(com.squareup.okhttp3:okhttp:4.3.1)_Android_Maven_Gradle - Fatal编程技术网

Android 错误:无法解析';的依赖项:app@debug/compileClasspath';:无法下载okhttp.jar(com.squareup.okhttp3:okhttp:4.3.1)

Android 错误:无法解析';的依赖项:app@debug/compileClasspath';:无法下载okhttp.jar(com.squareup.okhttp3:okhttp:4.3.1),android,maven,gradle,Android,Maven,Gradle,更新项目后,我遇到了一个错误,当我试图在app/build.gradle中添加一个gradle时,我无法处理该错误 请帮帮我 dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.constraintlayout:constrain

更新项目后,我遇到了一个错误,当我试图在
app/build.gradle中添加一个gradle时,我无法处理该错误

请帮帮我

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.2.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    implementation("com.squareup.okhttp3:okhttp:4.3.1") //that's the thing I want
}
错误

57s中配置成功错误:无法解析的依赖项 ':app@debug/compileClasspath':无法下载okhttp.jar (com.squareup.okhttp3:okhttp:4.3.1)显示受影响模块的详细信息:app

错误:无法解析“”的依赖项:app@debug/compileClasspath': 无法下载okio.jar(com.squareup.okio:okio:2.4.1)节目 受影响模块的详细信息:应用程序

发件人:您可以这样添加它

implementation group: 'com.squareup.okhttp3', name: 'okhttp', version: '3.8.0'
要从maven获得依赖关系,需要将其添加到存储库中

repositories {
    mavenCentral()
}
有帮助吗?