Join Slack
java.lang.NoSuchMethodError: No static method ModalBottomSheetLayout-BzaUkTc Why iam facing these e...
# compose
b
Binod Basnet
04/18/2024, 2:55 PM
java.lang.NoSuchMethodError: No static method ModalBottomSheetLayout-BzaUkTc Why iam facing these error while using ModalBottomSheetLayout ??
s
Spoudel347
04/18/2024, 3:04 PM
looks like a binary API incompatibility error, did you update any libraries recently?
b
Binod Basnet
04/18/2024, 3:54 PM
I recently added a ModalBottomSheetLayout and it start crashing
Binod Basnet
04/18/2024, 3:54 PM
@OptIn(ExperimentalMaterialNavigationApi::class) @Composable fun RootScreen() { val bottomSheetNavigator = rememberBottomSheetNavigator() val navController = rememberNavController() navController.navigatorProvider += bottomSheetNavigator // Add the bottom sheet navigator to your NavController ModalBottomSheetLayout(bottomSheetNavigator = bottomSheetNavigator) { Scaffold( bottomBar = { BottomNavigationBar(navController) } ) { Column( modifier = Modifier .fillMaxSize() .padding(it) ) { AppNavHost(navController = navController) } } } }
s
Spoudel347
04/18/2024, 5:07 PM
This usually happens because of incompatible library versions, try to update compose related things to latest stable release.
12
Views
Open in Slack
Previous
Next
kotlinlang
A modern programming language that makes developers happier.
Powered by