@ExperimentalFoundationApi @Composable fun rememberPagerState( initialPage: Int = 0, initialPageOffsetFraction: Float = 0f, pageCount: () -> Int ): PagerState
报错如下
java.lang.NoSuchMethodError: No static method HorizontalPager-AlbwjTQ(ILandroidx/compose/ui/Modifier;Landroidx/compose/foundation/pager/PagerState;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/Function3;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.fantasy.naduo-lujl7-vPnSPpHzhg7xp-Ow==/base.apk)
implementation platform('androidx.compose:compose-bom:2023.04.01')
时 MatissePreviewPage 里使用了 val pagerState = rememberPagerState(initialPage = initialPage) 这个方法已经更新了@ExperimentalFoundationApi @Composable fun rememberPagerState( initialPage: Int = 0, initialPageOffsetFraction: Float = 0f, pageCount: () -> Int ): PagerState
报错如下