I added this dependency and got this error
Could not resolve all dependencies for configuration 'composeAppwasmJsCompileClasspath'.
Could not resolve androidx.lifecyclelifecycle viewmodel compose2.8.0-beta01.
Required by:
project :composeApp
> No matching variant of androidx.lifecyclelifecycle viewmodel compose2.8.0-beta01 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 'androidxSourcesElements' capability androidx.lifecyclelifecycle viewmodel compose2.8.0-beta01:
Module "org.jetbrains.compose.foundation:foundation" has a reference to symbol org.jetbrains.skiko/SkikoKey.platformKeyCode.<get-platformKeyCode>|<get-platformKeyCode>(){}[0]. Neither the module itself nor its dependencies contain such declaration.
This could happen if the required dependency is missing in the project. Or if there is a dependency of "org.jetbrains.compose.foundation:foundation" that has a different version in the project than the version that "org.jetbrains.compose.foundation:foundation" was initially compiled with. Please check that the project configuration is correct and has consistent versions of all required dependencies.
Now I got this error. Do you know why ?
i
Ivan Matkov
04/26/2024, 11:43 PM
1. Version of compose.foundation != version of compose.ui
2. The binary compatibility was broken only in compose.ui 1.6.10-beta01 and was fixed in beta02
My advise here is to keep versions of these modules in sync even if they should be compatible between different ones