gpt4 book ai didi

kotlin-multiplatform - 无法启动依赖于公开库的新 kotlin 多平台库

转载 作者:行者123 更新时间:2023-12-05 04:42:50 25 4
gpt4 key购买 nike

我想在我正在编写的 kotlin 多平台库中使用 jetbrains 公开库。我该怎么做呢?我收到一个 gradle 构建错误,它无法找到它需要公开的所有内容。这是我的 gradle 构建

sourceSets {
val commonMain by getting {
dependencies {
implementation("org.jetbrains.exposed:exposed-core:0.34.1")
}
}
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
}
}
val jvmMain by getting
val jvmTest by getting
val jsMain by getting
val jsTest by getting
val nativeMain by getting
val nativeTest by getting
}

我在构建日志中得到了这个

Failed building KotlinMPPGradleModel
org.gradle.internal.resolve.ArtifactNotFoundException: Could not find exposed-core-0.34.1-samplessources.jar (org.jetbrains.exposed:exposed-core:0.34.1).
Searched in the following locations:
https://repo.maven.apache.org/maven2/org/jetbrains/exposed/exposed-core/0.34.1/exposed-core-0.34.1-samplessources.jar
at org.gradle.internal.resolve.result.DefaultBuildableArtifactResolveResult.notFound(DefaultBuildableArtifactResolveResult.java:28)...

最佳答案

这个库只针对 jvm,因为你有本地目标,它与你的公共(public)源集不兼容

关于kotlin-multiplatform - 无法启动依赖于公开库的新 kotlin 多平台库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69789921/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com