gradle KMP:未能添加'cafe.adriel.voyager'依赖项

vuv7lop3  于 2024-01-08  发布在  其他
关注(0)|答案(1)|浏览(94)

通过使用向导(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" }

个字符
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项目?

更新

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

q3qa4bjr

q3qa4bjr1#

正如第269号问题所提到的:
KotlinWASM仅在Compose多平台alpha中可用,Voyager可能只会在Compose的稳定版本中包含支持。
KMP中的路由可以使用什么替代?
由于没有明显的替代方案,您需要监视adrielcafe/voyager PR 289,这是关于添加对KotlinWASM的支持并将Compose更新到1.6.0-alpha 01。
这项工作仍在进行中。

相关问题