通过使用向导(https://kmp.jetbrains.com),我创建了一个示例项目,但在导入"voyager"(https://voyager.adriel.cafe/setup)时遇到错误:

# gradle/libs.versions.toml

[versions]
voyager = "1.1.0-alpha01"

[libraries]
voyager-navigator = { module = "cafe.adriel.voyager:voyager-navigator", version.ref = "voyager" }
voyager-screenModel = { module = "cafe.adriel.voyager:voyager-screenmodel", version.ref = "voyager" }
voyager-bottomSheetNavigator = { module = "cafe.adriel.voyager:voyager-bottom-sheet-navigator", version.ref = "voyager" }
voyager-tabNavigator = { module = "cafe.adriel.voyager:voyager-tab-navigator", version.ref = "voyager" }
voyager-transitions = { module = "cafe.adriel.voyager:voyager-transitions", version.ref = "voyager" }
# composeApp/build.gradle.kts

kotlin {
    sourceSets {
        commonMain.dependencies {
            implementation("cafe.adriel.voyager:voyager-navigator:1.1.0-alpha01")
            implementation("cafe.adriel.voyager:voyager-screenmodel:1.1.0-alpha01")
        }
    }
}

接受gradlew build%的错误:

$ gradlew run
Type-safe project accessors is an incubating feature.

> Configure project :composeApp
New 'wasm' target is Work-in-Progress and is subject to change without notice.
w: The following Kotlin/Native targets cannot be built on this machine and are disabled:
iosArm64, iosSimulatorArm64, iosX64
To hide this message, add 'kotlin.native.ignoreDisabledTargets=true' to the Gradle properties.


FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all dependencies for configuration ':composeApp:wasmJsCompileClasspath'.
> Could not resolve cafe.adriel.voyager:voyager-navigator:1.1.0-alpha01.
  Required by:
      project :composeApp
   > No matching variant of cafe.adriel.voyager:voyager-navigator:1.1.0-alpha01 was found. The consumer was configured to find a library for use during 'kotlin-api', preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm', attribute 'org.jetbrains.kotlin.wasm.target' with value 'js' but:
       - Variant 'debugApiElements-published' capability cafe.adriel.voyager:voyager-navigator:1.1.0-alpha01 declares a library for use during compile-time:
           - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
       - Variant 'debugRuntimeElements-published' capability cafe.adriel.voyager:voyager-navigator:1.1.0-alpha01 declares a library for use during runtime:
           - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
       - Variant 'debugSourcesElements-published' capability cafe.adriel.voyager:voyager-navigator:1.1.0-alpha01 declares a component for use during runtime:
           - Incompatible because this component declares documentation, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' and the consumer needed a library, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
       - Variant 'desktopApiElements-published' capability cafe.adriel.voyager:voyager-navigator:1.1.0-alpha01 declares a library for use during compile-time:
           - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
       - Variant 'desktopRuntimeElements-published' capability cafe.adriel.voyager:voyager-navigator:1.1.0-alpha01 declares a library for use during runtime:
           - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
       - Variant 'desktopSourcesElements-published' capability cafe.adriel.voyager:voyager-navigator:1.1.0-alpha01 declares a component for use during runtime:
           - Incompatible because this component declares documentation, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' and the consumer needed a library, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
       - Variant 'iosArm64ApiElements-published' capability cafe.adriel.voyager:voyager-navigator:1.1.0-alpha01 declares a library for use during 'kotlin-api':
           - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
       - Variant 'iosArm64MetadataElements-published' capability cafe.adriel.voyager:voyager-navigator:1.1.0-alpha01 declares a library:
           - Incompatible because this component declares a component for use during 'kotlin-metadata', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a component for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
       - Variant 'iosArm64SourcesElements-published' capability cafe.adriel.voyager:voyager-navigator:1.1.0-alpha01:
           - Incompatible because this component declares documentation for use during 'kotlin-runtime', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a library for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
       - Variant 'iosSimulatorArm64ApiElements-published' capability cafe.adriel.voyager:voyager-navigator:1.1.0-alpha01 declares a library for use during 'kotlin-api':
           - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
       - Variant 'iosSimulatorArm64MetadataElements-published' capability cafe.adriel.voyager:voyager-navigator:1.1.0-alpha01 declares a library:
           - Incompatible because this component declares a component for use during 'kotlin-metadata', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a component for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
       - Variant 'iosSimulatorArm64SourcesElements-published' capability cafe.adriel.voyager:voyager-navigator:1.1.0-alpha01:
           - Incompatible because this component declares documentation for use during 'kotlin-runtime', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a library for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
       - Variant 'iosX64ApiElements-published' capability cafe.adriel.voyager:voyager-navigator:1.1.0-alpha01 declares a library for use during 'kotlin-api':
           - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
       - Variant 'iosX64MetadataElements-published' capability cafe.adriel.voyager:voyager-navigator:1.1.0-alpha01 declares a library:
           - Incompatible because this component declares a component for use during 'kotlin-metadata', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a component for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
       - Variant 'iosX64SourcesElements-published' capability cafe.adriel.voyager:voyager-navigator:1.1.0-alpha01:
           - Incompatible because this component declares documentation for use during 'kotlin-runtime', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a library for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
       - Variant 'jsApiElements-published' capability cafe.adriel.voyager:voyager-navigator:1.1.0-alpha01 declares a library for use during 'kotlin-api':
           - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
       - Variant 'jsRuntimeElements-published' capability cafe.adriel.voyager:voyager-navigator:1.1.0-alpha01 declares a library:
           - Incompatible because this component declares a component for use during 'kotlin-runtime', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js' and the consumer needed a component for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
       - Variant 'jsSourcesElements-published' capability cafe.adriel.voyager:voyager-navigator:1.1.0-alpha01:
           - Incompatible because this component declares documentation for use during 'kotlin-runtime', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js' and the consumer needed a library for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
       - Variant 'macosArm64ApiElements-published' capability cafe.adriel.voyager:voyager-navigator:1.1.0-alpha01 declares a library for use during 'kotlin-api':
           - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
       - Variant 'macosArm64MetadataElements-published' capability cafe.adriel.voyager:voyager-navigator:1.1.0-alpha01 declares a library:
           - Incompatible because this component declares a component for use during 'kotlin-metadata', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a component for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
       - Variant 'macosArm64SourcesElements-published' capability cafe.adriel.voyager:voyager-navigator:1.1.0-alpha01:
           - Incompatible because this component declares documentation for use during 'kotlin-runtime', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a library for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
       - Variant 'macosX64ApiElements-published' capability cafe.adriel.voyager:voyager-navigator:1.1.0-alpha01 declares a library for use during 'kotlin-api':
           - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
       - Variant 'macosX64MetadataElements-published' capability cafe.adriel.voyager:voyager-navigator:1.1.0-alpha01 declares a library:
           - Incompatible because this component declares a component for use during 'kotlin-metadata', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a component for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
       - Variant 'macosX64SourcesElements-published' capability cafe.adriel.voyager:voyager-navigator:1.1.0-alpha01:
           - Incompatible because this component declares documentation for use during 'kotlin-runtime', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a library for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
       - Variant 'metadataApiElements' capability cafe.adriel.voyager:voyager-navigator:1.1.0-alpha01 declares a library:
           - Incompatible because this component declares a component for use during 'kotlin-metadata', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'common' and the consumer needed a component for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
       - Variant 'metadataSourcesElements' capability cafe.adriel.voyager:voyager-navigator:1.1.0-alpha01:
           - Incompatible because this component declares documentation for use during 'kotlin-runtime', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'common' and the consumer needed a library for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
       - Variant 'releaseApiElements-published' capability cafe.adriel.voyager:voyager-navigator:1.1.0-alpha01 declares a library for use during compile-time:
           - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
       - Variant 'releaseRuntimeElements-published' capability cafe.adriel.voyager:voyager-navigator:1.1.0-alpha01 declares a library for use during runtime:
           - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
       - Variant 'releaseSourcesElements-published' capability cafe.adriel.voyager:voyager-navigator:1.1.0-alpha01 declares a component for use during runtime:
           - Incompatible because this component declares documentation, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' and the consumer needed a library, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
> Could not resolve cafe.adriel.voyager:voyager-screenmodel:1.1.0-alpha01.
  Required by:
      project :composeApp
   > No matching variant of cafe.adriel.voyager:voyager-screenmodel:1.1.0-alpha01 was found. The consumer was configured to find a library for use during 'kotlin-api', preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm', attribute 'org.jetbrains.kotlin.wasm.target' with value 'js' but:
       - Variant 'debugApiElements-published' capability cafe.adriel.voyager:voyager-screenmodel:1.1.0-alpha01 declares a library for use during compile-time:
           - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
       - Variant 'debugRuntimeElements-published' capability cafe.adriel.voyager:voyager-screenmodel:1.1.0-alpha01 declares a library for use during runtime:
           - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
       - Variant 'debugSourcesElements-published' capability cafe.adriel.voyager:voyager-screenmodel:1.1.0-alpha01 declares a component for use during runtime:
           - Incompatible because this component declares documentation, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' and the consumer needed a library, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
       - Variant 'desktopApiElements-published' capability cafe.adriel.voyager:voyager-screenmodel:1.1.0-alpha01 declares a library for use during compile-time:
           - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
       - Variant 'desktopRuntimeElements-published' capability cafe.adriel.voyager:voyager-screenmodel:1.1.0-alpha01 declares a library for use during runtime:
           - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
       - Variant 'desktopSourcesElements-published' capability cafe.adriel.voyager:voyager-screenmodel:1.1.0-alpha01 declares a component for use during runtime:
           - Incompatible because this component declares documentation, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' and the consumer needed a library, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
       - Variant 'iosArm64ApiElements-published' capability cafe.adriel.voyager:voyager-screenmodel:1.1.0-alpha01 declares a library for use during 'kotlin-api':
           - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
       - Variant 'iosArm64MetadataElements-published' capability cafe.adriel.voyager:voyager-screenmodel:1.1.0-alpha01 declares a library:
           - Incompatible because this component declares a component for use during 'kotlin-metadata', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a component for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
       - Variant 'iosArm64SourcesElements-published' capability cafe.adriel.voyager:voyager-screenmodel:1.1.0-alpha01:
           - Incompatible because this component declares documentation for use during 'kotlin-runtime', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a library for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')


...

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

假设,做了一些完全错误的事情.将依赖于你的帮助.将依赖项添加到KMP项目中的正确方式是什么?

Update

看起来问题已经被发现了-https://github.com/adrielcafe/voyager/issues/269.在这种情况下,问题是--"KMP中的路由可以用什么来代替?"

推荐答案

正如前面提到的issue 269人所说:

Kotlin WASM只在Compose多平台Alpha中可用,Voyager可能只会在Compose的稳定版本中包含支持.


KMP中的工艺路由可以使用什么来代替?

由于没有明显的替代方案,您需要监视adrielcafe/voyager PR 289,这是关于添加对Kotlin WASM的支持并将Compose更新到1.6.0-alpha01.

这一点仍在进行中.

Kotlin相关问答推荐

如何在Jetpack Compose中从领域查询中读取数据?

处理合成层次 struct 中的深层按钮以切换视图

在 Kotlin 中,为什么我们要在闭包中捕获值

Kotlin supervisorScope 即使包裹在 try catch 中也会失败

为什么多线程不会使执行更快

为什么 Kotlin 在 sumOf 函数 lambda 中默认不将数字视为Int?

如何在 Kotlin 中为变量分配另一个变量的值?

如何从 kotlin 函数中 Select 正确的枚举值

如何使用 Android CameraX 自动对焦

找不到引用的类 kotlin.internal.annotations.AvoidUninitializedObjectCopyingCheck

判断 AAR 元数据值时发现的一个或多个问题:

`this@classname` 在 Kotlin 中是什么意思?

如何设置两列recyclerview?

当被Spring代理类访问时,Kotlin实例变量为null

参数不匹配;SimpleXML

Kotlin:具有多个不同类型设置器的单个属性

如何将vararg作为数组传递给Kotlin中的函数?

用 kotlin 学习 Android MVVM 架构组件

具有多个 parameter的 Kotlin 枚举

Kotlin反射不可用