:white_check_mark: [Solved] The problem was `activ...
# compose
m
[Solved] The problem was
activity-compose
,
navigation-compose
,
hilt-navigation-compose
dependencies has their own compose foundation dependency and the version was 1.7.0-beta which causes conflicts with CMP. I was able to resolve this by excluding those and specify the version that I want. Hello guys, I have a pager using jetpack compose and I wanted to migrate it to Compose Multiplatform. So, I setup a shared module for compose UI only and move the pager inside the module and use it from my android app module. After the migration, I create a sample desktop app and could run it without issue, but it keeps crashing on my existing Android app. Any idea why that might be? dependency versions • Compose Multiplatform - 1.6.11 • Jetpack Compose (in android module) - 2024.06.00 (BOM) • Kotlin - 2.0.10 The error log is like below.
Copy code
java.lang.NoSuchMethodError: No static method HorizontalPager-xYaah8o(Landroidx/compose/foundation/pager/PagerState;Landroidx/compose/ui/Modifier;Landroidx/compose/foundation/layout/PaddingValues;Landroidx/compose/foundation/pager/PageSize;IFLandroidx/compose/ui/Alignment$Vertical;Landroidx/compose/foundation/gestures/snapping/SnapFlingBehavior;ZZLkotlin/jvm/functions/Function1;Landroidx/compose/ui/input/nestedscroll/NestedScrollConnection;Lkotlin/jvm/functions/Function4;Landroidx/compose/runtime/Composer;III)V in class Landroidx/compose/foundation/pager/PagerKt; or its super classes (declaration of 'androidx.compose.foundation.pager.PagerKt' appears in /data/app/com.melomm.melomusic.dev-ZBV6ErSCyXSqoE1mOHof8w==/base.apk)
а
Hey @Myo Lwin Oo, could you share please which version you chose exactly?
m
@Адамыч I chose compose
"1.6.8"
for android. But right now, the new version for compose multiplatform is out and don't need to do this manually. You can just use latest version for Jetpack compose and Compose multiplatform.
а
Thanks a lot! Will give a try.
🙌 1
m
you can use compose multiplatform =>
1.7.0-beta02
compose bom (android) =>
2024.09.01
174 Views