I am trying to use this, but does not work. Not sure of why.
androidx.navigation.compose.NavHost(
navHostController = navHostController,
route = Graph.ROOT,
startDestination = Graph.HOME
){
}
I get the following error(s):
None of the following functions can be called with the arguments supplied.
NavHost(NavHostController, NavGraph, Modifier = ...) defined in androidx.navigation.compose
NavHost(NavHostController, String, Modifier = ..., String? = ..., NavGraphBuilder.() → Unit) defined in androidx.navigation.compose
CodePudding user response:
There is a typo with navHostController
. The parameter is navController
androidx.navigation.compose.NavHost(
navController = navHostController,
//...
)