【问题标题】:Could not resolve org.jetbrains:kotlin-css-jvm:1.0.0-pre.31-kotlin-1.2.41无法解析 org.jetbrains:kotlin-css-jvm:1.0.0-pre.31-kotlin-1.2.41
【发布时间】:2021-09-09 04:51:17
【问题描述】:

我想构建一个基于 ktor 的文件,但我得到了编译错误,但我不知道出了什么问题。

编译错误:

无法解析org.jetbrains:kotlin-css-jvm:1.0.0-pre.31-kotlin-1.2.41

这些是我的依赖项:

dependencies {
    implementation("io.ktor:ktor-server-core:$ktor_version")
    implementation("io.ktor:ktor-server-netty:$ktor_version")
    implementation("ch.qos.logback:logback-classic:$logback_version")

    testImplementation("io.ktor:ktor-server-tests:$ktor_version")
    implementation("org.jetbrains:kotlin-css-jvm:1.0.0-pre.31-kotlin-1.2.41")
    implementation("io.ktor:ktor-auth:$ktor_version")
    implementation("io.ktor:ktor-gson:$ktor_version")
    implementation("org.litote.kmongo:kmongo:4.0.2")
    implementation("org.litote.kmongo:kmongo-coroutine:4.0.2")
    implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.7")
    implementation("commons-codec:commons-codec:1.14")
    implementation("io.ktor:ktor-network-tls:$ktor_version")
    implementation("io.ktor:ktor-freemarker:$ktor_version")

}

【问题讨论】:

  • repositories 块中有什么?

标签: kotlin intellij-idea ktor


【解决方案1】:

升级css-jvm版本解决问题。

implementation "org.jetbrains:kotlin-css-jvm:1.0.0-pre.31-kotlin-1.2.41" to implementation "org.jetbrains:kotlin-css-jvm:1.0.0-pre.122-kotlin-1.4.10"

【讨论】:

    【解决方案2】:

    添加这个对我有用

    repositories {
        mavenCentral()
        maven { url = uri("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/kotlin-js-wrappers/") }
    }
    
    dependencies {
           implementation ("org.jetbrains:kotlin-css-jvm:1.0.0-pre.31-kotlin-1.2.41")
    }
    

    https://mvnrepository.com/repos/space-kotlin-js-wrappers

    其他版本 https://mvnrepository.com/artifact/org.jetbrains.kotlin-wrappers/kotlin-css?repo=space-kotlin-js-wrappers

    【讨论】:

      【解决方案3】:

      此库位于 kotlin-js-wrappers 存储库中。确保您已将此存储库添加到您的存储库列表中:

      repositories {
          maven { url = uri("https://dl.bintray.com/kotlin/kotlin-js-wrappers/") }
      }
      

      另外,请注意,此库的现代版本有另一个工件组和名称 (org.jetbrains.kotlin-wrappers:kotlin-css),并发布在 mavenCentral() 存储库中。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2013-07-24
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多