John O'Reilly
06/02/2024, 7:57 AMHorizontalPager
in shared compose code and am getting java.lang.NoSuchMethodError: No static method HorizontalPager...
crash. I have to use that 1.7 bera due in turn to dependency on lifecycle 2.8.. I also tried 1.6.20-dev1663 but still get same issueJohn O'Reilly
06/02/2024, 8:29 AM06-02 09:28:59.102 18848 18848 E AndroidRuntime: 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/~~LCU5wCqVnArSjHNIl8WB1g==/dev.johnoreilly.confetti-Ehh6uoP6VBMVdXCHrU1ZvA==/base.apk)
06-02 09:28:59.102 18848 18848 E AndroidRuntime: at dev.johnoreilly.confetti.ui.SessionListGridViewKt.SessionListGridView(SessionListGridView.kt:76)
agrosner
06/02/2024, 11:31 PMIvan Matkov
06/03/2024, 7:40 AMRunning in to issue with combination it seems of Jetpack Compose 1.7.0-beta and CMP 1.6.10There are some experimental functions that changed between 1.6 and 1.7, so such crashes are expected during such version mixing.
I have to use that 1.7 bera due in turn to dependency on lifecycle 2.8No, you don't have to. The only problem (only on Android) with Compose 1.6 + lifecycle 2.8 is usage of newly defined
LocalLifecycleOwner
. That used as default parameter in lifecycle library itself. Just pass old one. See https://issuetracker.google.com/336842920#comment8 for details. Also a reflection hack to mitigate situation is on the way.
All above is about Android, CMP 1.6.10 works fine in this place.
We had pretty much exact crash from including the navigation compose 2.8 beta and had to force the compose runtime versionNo, situation with navigation is different - it's really depends on Compose 1.7. So for multiplatform I have to switch on 2.7.* branch during Compose 1.6.* releases
John O'Reilly
06/03/2024, 7:56 AMIvan Matkov
06/03/2024, 8:00 AMАдамыч
09/12/2024, 5:46 PM