Reputation: 3
I wrote the next code
val navController = this.findNavController(R.id.my_nav_host_fragment)
return NavigationUI.navigateUp(drawerLayout, navController) // that line makes an error
After what I caught that error
Too many arguments for public open fun navigateUp(): Boolean defined in androidx.navigation.NavController
My imports connected to this block of code are
import androidx.navigation.findNavController
Gradle config
def nav_version = "2.5.3"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version"
I've tried a solution from here, but it didn't help at all, because doing that I just got a new error
Unresolved reference: findNavController
Upvotes: 0
Views: 81