【发布时间】:2021-07-27 16:49:16
【问题描述】:
我更新了 Android Studio 4.2,但我无法创建新项目 kotlin
A problem occurred configuring root project 'My Application'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.0-release-764.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.5.0-release-
764/kotlin-gradle-plugin-1.5.0-release-764.pom
- https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.5.0-release-764/kotlin-gradle-plugin-1.5.0-release-764.pom
Required by:
project :
Possible solution:
- Declare repository providing the artifact, see the documentation at
https://docs.gradle.org/current/userguide/declaring_repositories.html
【问题讨论】:
-
删除“-release-764”例如类路径“org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.0”
-
但是 lint 发出警告“用于使用 Gradle (1.5.0) 构建的 Kotlin 版本与捆绑到 IDE 插件 (1.5.0-release-764) 中的版本不同”如果版本是捆绑IDE的,gradle怎么找不到呢?
-
已在 Android Studio 4.2.1 中修复:androidstudio.googleblog.com/2021/05/…
-
Could not resolve all artifacts的通用解决方案在将来也会有所帮助,因为 IDE 中的一些错误或错误地使用了错误的工件版本。如果有帮助,请告诉我。 stackoverflow.com/a/67760444/4828650
标签: android android-studio kotlin android-studio-4.2