java.lang.NoSuchMethodError: No static method Moda...
# compose
b
java.lang.NoSuchMethodError: No static method ModalBottomSheetLayout-BzaUkTc Why iam facing these error while using ModalBottomSheetLayout ??
s
looks like a binary API incompatibility error, did you update any libraries recently?
b
I recently added a ModalBottomSheetLayout and it start crashing
@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
This usually happens because of incompatible library versions, try to update compose related things to latest stable release.