这是什么意思?
我试图更改ext.kotlin_version = '1.5.0'
为,ext.kotlin_version = '1.5.0-release-764'
但在这种情况下,gradle 项目无法构建Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.0-release-764.
更新 ext.kotlin_version = '1.5.0'
- 也不起作用,同样的错误和警告
构建.gradle:
buildscript {
ext.kotlin_version = '1.5.0'
repositories {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
}
}
gradle-wrapper.properties:
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
无法解析配置“:classpath”的所有工件。找不到 org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.0。在以下位置搜索: - https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.5.0/kotlin-gradle-plugin-1.5.0.pom 如果您尝试检索的工件可以在存储库中找到但没有“Maven POM”格式的元数据,则需要调整存储库声明的“metadataSources { ... }”。
更新 2
我必须添加mavenCentral()
以使其工作,虽然警告仍然存在,但它建立
如果在更新一个依赖项的版本后,4.2 版本在项目结构窗口中无休止地加载建议,这也是另一个问题