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()
}
有帮助吗?