Closed YuXunSTC closed 2 months ago
Please use English.
What problem do you have exactly? The latest gav is app.softwork:routing-compose:0.2.14
and it's available on maven central.
I don't know how to use this library
I downloaded a compose multiplatform template that only contains web,
and I don't know where to put this dependency,
if I put this dependency in the commonMain ,it will build error
Could not determine the dependencies of task ':kotlinNpmInstall'.
> Could not resolve all dependencies for configuration ':composeApp:wasmJsNpmAggregated'.
> Could not resolve app.softwork:routing-compose:0.2.14.
Required by:
project :composeApp
> No matching variant of app.softwork:routing-compose:0.2.14 was found. The consumer was configured to find a library for use during 'kotlin-runtime', preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.js.public.package.json' with value 'public-package-json', attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm', attribute 'org.jetbrains.kotlin.wasm.target' with value 'js' but:
- Variant 'jsApiElements-published' declares a library:
- Incompatible because this component declares a component for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js' and the consumer needed a component for use during 'kotlin-runtime', 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.js.public.package.json (required 'public-package-json')
- Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')
if I put this dependency in the jsMain ,I can't find HashRouter() method ,Looks like the library wasn't pulled down
I have learned compose multiplatform for a short time. If there have a complete sample that uses remote dependency, I should be able to understand how to use this library, just like the samples folder in compose multiplatform official library. I have two more demands
There is no wasm target yet, so you can't use this navigation library, but there is a library from JetBrains/Google with experimental support: https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-navigation-routing.html
🤦♂️ thank you
我按照教程 添加了指定的依赖,找不到对应的方法名称,能不能出一个使用远程依赖的demo ,不要使用依赖本地项目
在项目中建个文件夹,叫sample ,然后里面是个完整的项目,就像compose-multiplatform 中的那种samples ,我想如果这样,我应该就能看明白怎么用了。
由于我看不懂如何用,我把这个项目拉下来,然后在这个基础上改一改╮(╯▽╰)╭,只能先这样搞了