Как ее решить?
Объекты:
Код: Выделить всё
@Serializable
data object MainScreen {
@Serializable
data class MainScreenFirstScreen(val id: Int? = null)
}
Код: Выделить всё
FirstLoginOwnerSixthScreenRoot(
onNavigateToNextScreen = { id ->
navHostController.navigate(
route = MainScreen.MainScreenFirstScreen(
id = id
)
)
Код: Выделить всё
fun NavGraphBuilder.mainScreenOwnerNavGraph() {
navigation(
startDestination = MainScreen.MainScreenFirstScreen()
) {
composable { navBackStackEntry ->
val navHostController = LocalNavHostContoller.current
Text("Main Screen")
}
}
}
Код: Выделить всё
kotlinx.serialization.SerializationException: Serializer for class 'MainScreen' is not found.
Please ensure that class is marked as '@Serializable' and that the serialization compiler plugin is applied.
Подробнее здесь: https://stackoverflow.com/questions/792 ... een-is-not
Мобильная версия