Myo Lwin Oo
08/12/2024, 4:58 PMactivity-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.
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)
Адамыч
09/12/2024, 5:44 PMMyo Lwin Oo
09/12/2024, 6:32 PM"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.Адамыч
09/12/2024, 6:33 PMMyo Lwin Oo
09/12/2024, 6:40 PM1.7.0-beta02
compose bom (android) => 2024.09.01