【发布时间】:2021-12-24 12:58:52
【问题描述】:
重新安装 android studio 和 vscode 后,我遇到了 kotlin 和 gradle 的问题。 我所做的更改位于 build.gradle 下的 android 文件夹的根目录中。
buildscript {
ext.kotlin_version = '1.5.21 ' //previous was 1.5.20
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.2' // previous was 4.1.1
classpath 'com.google.gms:google-services:4.3.8'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
我没有进行任何其他更改,我该如何解决这个问题?我得到的错误是
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21 .
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.5.21 /kotlin-gradle-plugin-1.5.21 .pom
- https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.5.21 /kotlin-gradle-plugin-1.5.21 .pom
Required by:
project :
【问题讨论】:
标签: flutter kotlin visual-studio-code