我有一個用java編寫的項目我正在使用gradle集成kotlin。我試圖按照https://kotlinlang.org/docs/reference/using-gradle.html錯誤:無法解決版本的依賴關係'org.jetbrains.kotlin:kotlin-stdlib-jre7:jar'
我的build.gradle
buildscript {
ext.kotlin_version = '1.1.51'
repositories {
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
apply plugin: "kotlin"
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7"
}
根據Kotlin Error : Could not find org.jetbrains.kotlin:kotlin-stdlib-jre7:1.0.7庫僅在科特林v1.1和最多可用。當我部署這個庫並在我的android項目中使用它時,我會在標題中看到錯誤。