更新项目后,我在尝试在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
}
错误
最佳答案
从this answer:您可以像这样添加它
implementation group: 'com.squareup.okhttp3', name: 'okhttp', version: '3.8.0'
并从maven获取依赖项,您需要将此添加到存储库中
repositories {
mavenCentral()
}
关于android - 错误:无法解析 ':app@debug/compileClasspath'的依赖项:无法下载okhttp.jar(com.squareup.okhttp3:okhttp:4.3.1),我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/59798010/