我更新了 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
最佳答案
错误很明显 Gradle 无法找到您声明的库
可能的修复
位置
Project -> build.gradle
//update it
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.30"
}
已编辑 kotlin 昨晚发布了 1.5.0 版的稳定版,你可以使用这个版本来保持最新状态dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.0"
}
关于android - 更新到 Android Studio 4.2 后无法创建新的 Kotlin 项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67400029/