I have a module wich is used in the main phone app...
# compose
b
I have a module wich is used in the main phone app and in a wear os app. The module uses compose, so I added compose as dependencies:
Copy code
implementation(platform(libs.compose.bom)) // 2023.08.00
implementation(libs.compose.ui)
implementation(libs.compose.animation)
implementation(libs.compose.foundation)
When I now run the phone app, it crashes with
java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/compose/runtime/PrimitiveSnapshotStateKt;
(
mutableFloatStateOf
) but runtime dependency is added 🤔 The wear app builds fine. I found out, that the phone app runs fine if I add e.g. the accompanist pager as dependency - which makes no sense for me… But then the wear app crashes at runtime with
java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/compose/runtime/PrimitiveSnapshotStateKt;
(
mutableFloatStateOf
) (so exact same reason as the phone app before) Does anyone have an idea why this happens and how I can fix this?
✅ 1
Ok, found the problem, I used accompanist version 0.33.0-alpha based on the table:
But this pulls Compose 1.6.0-alpha in - the version mapping is wrong on the website. I need accompanist 0.32.0…