Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Navigation Material] Crash when using ModalBottomSheetLayout with compose 1.6 #1671

Closed
desai-tapan opened this issue Jul 4, 2023 · 2 comments · Fixed by #1691
Closed

[Navigation Material] Crash when using ModalBottomSheetLayout with compose 1.6 #1671

desai-tapan opened this issue Jul 4, 2023 · 2 comments · Fixed by #1691
Assignees

Comments

@desai-tapan
Copy link

When I use ModalBottomSheetLayout with Compose 1.6, app is crashing on launch. If I remove ModalBottomSheetLayout it works fine. After looking at the stacktrace I even tried to use full path like this com.google.accompanist.navigation.material.ModalBottomSheetLayout, but still the it was crashing

Compose version - 1.6.0-alpha01
Accompanist version - v0.31.5-beta

Adding the stacktrace below

java.lang.NoSuchMethodError: No static method ModalBottomSheetLayout-BzaUkTc(Lkotlin/jvm/functions/Function3;Landroidx/compose/ui/Modifier;Landroidx/compose/material/ModalBottomSheetState;Landroidx/compose/ui/graphics/Shape;FJJJLkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;II)V in class Landroidx/compose/material/ModalBottomSheetKt; or its super classes (declaration of 'androidx.compose.material.ModalBottomSheetKt' appears in /data/app/~~PpDYdXgZWa06bMhp8gTzPw==/com.fynd.pos.debug-rJuYMX6SN_8Ch5oHAC3TkA==/base.apk) at com.google.accompanist.navigation.material.BottomSheetKt.ModalBottomSheetLayout-4erKP6g(BottomSheet.kt:48) at com.example.MainActivity$MobileScreen$2.invoke(MainActivity.kt:1069) at com.example.MainActivity$MobileScreen$2.invoke(MainActivity.kt:1068) at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:117) at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35) at androidx.compose.material.ScaffoldKt$ScaffoldLayout$1$1$1$bodyContentPlaceables$1.invoke(Scaffold.kt:322) at androidx.compose.material.ScaffoldKt$ScaffoldLayout$1$1$1$bodyContentPlaceables$1.invoke(Scaffold.kt:320) at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108) at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35) at androidx.compose.ui.layout.LayoutNodeSubcompositionsState$subcompose$3$1$1.invoke(SubcomposeLayout.kt:894) at androidx.compose.ui.layout.LayoutNodeSubcompositionsState$subcompose$3$1$1.invoke(SubcomposeLayout.kt:475) at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108) at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35) at androidx.compose.runtime.ActualJvm_jvmKt.invokeComposable(ActualJvm.jvm.kt:78) at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:3196) at androidx.compose.runtime.ComposerImpl.composeContent$runtime_release(Composer.kt:3129) at androidx.compose.runtime.CompositionImpl.composeContent(Composition.kt:589) at androidx.compose.runtime.Recomposer.composeInitial$runtime_release(Recomposer.kt:1041) at androidx.compose.runtime.ComposerImpl$CompositionContextImpl.composeInitial$runtime_release(Composer.kt:3488) at androidx.compose.runtime.CompositionImpl.setContent(Composition.kt:521) at androidx.compose.ui.layout.LayoutNodeSubcompositionsState.subcomposeInto(SubcomposeLayout.kt:495) at androidx.compose.ui.layout.LayoutNodeSubcompositionsState.subcompose(SubcomposeLayout.kt:468) at androidx.compose.ui.layout.LayoutNodeSubcompositionsState.subcompose(SubcomposeLayout.kt:459) at androidx.compose.ui.layout.LayoutNodeSubcompositionsState.subcompose(SubcomposeLayout.kt:443) at androidx.compose.ui.layout.LayoutNodeSubcompositionsState$Scope.subcompose(SubcomposeLayout.kt:807) at androidx.compose.material.ScaffoldKt$ScaffoldLayout$1$1$1.invoke(Scaffold.kt:320) at androidx.compose.material.ScaffoldKt$ScaffoldLayout$1$1$1.invoke(Scaffold.kt:243) at androidx.compose.ui.layout.MeasureScope$layout$1.placeChildren(MeasureScope.kt:70) at androidx.compose.ui.layout.LayoutNodeSubcompositionsState$createMeasurePolicy$1$measure-3p2s80s$$inlined$createMeasureResult$2.placeChildren(SubcomposeLayout.kt:892) at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate$layoutChildren$1$1.invoke(LayoutNodeLayoutDelegate.kt:376) at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate$layoutChildren$1$1.invoke(LayoutNodeLayoutDelegate.kt:368) at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:2303) at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe(SnapshotStateObserver.kt:462) at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:230)

@bentrengrove
Copy link
Collaborator

Looks like we need a specific Compose 1.6 branch version as this is a binary compatibility issue. I will get that done, sorry about that.

@TurKurT656
Copy link

I encountered same problem with compose 1.5.0-beta03

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants