【发布时间】:2022-01-20 15:07:47
【问题描述】:
我遵循了这个教程:https://www.journaldev.com/13629/okhttp-android-example-tutorial 但是当我尝试启动项目时给我这个错误:
Execution failed for task ':app:checkDebugAarMetadata'.
Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Could not find com.squareup.okhttp3:okhttps:3.4.1.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/squareup/okhttp3/okhttps/3.4.1/okhttps-3.4.1.pom
- https://repo.maven.apache.org/maven2/com/squareup/okhttp3/okhttps/3.4.1/okhttps-3.4.1.pom
- https://jcenter.bintray.com/com/squareup/okhttp3/okhttps/3.4.1/okhttps-3.4.1.pom
Required by:
project :app
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
而正是当我尝试写 implementation 'com.squareup.okhttp3:okhttps:3.4.1'
【问题讨论】:
-
我在查看 square 文档,并没有出现 okhttps,只有 okhttp -> implementation("com.squareup.okhttp3:okhttp:4.9.3") 可以不带 s 试试吗?
标签: android maven dependencies okhttp