Initial step when creating a navigation in Android Studio

Asked

Viewed 9 times

0

It’s very basic, but I’m not able to implement it. I’m wanting to start studying navigation, but not being able to implement it correctly.

On the android site they ask me to put this code in the build.Radle, but it seems that I am doing wrong. Someone to save?

dependencies {
val nav_version = "2.3.5"

// Java language implementation
implementation("androidx.navigation:navigation-fragment:$nav_version")
implementation("androidx.navigation:navigation-ui:$nav_version")

// Kotlin
implementation("androidx.navigation:navigation-fragment-ktx:$nav_version")
implementation("androidx.navigation:navigation-ui-ktx:$nav_version")

// Feature module Support
implementation("androidx.navigation:navigation-dynamic-features-fragment:$nav_version")

// Testing Navigation
androidTestImplementation("androidx.navigation:navigation-testing:$nav_version")

// Jetpack Compose Integration
implementation("androidx.navigation:navigation-compose:2.4.0-alpha05")
}

This is the warning/error I get when I try to add a navigation without putting these dependencies (and apparently I have to add them before).

Aviso para dependency

  • At first, I would suggest removing the navigation-compose. If the problem persists, I was going to ask you to try to post the build.gradle in a full gist or Pastebin.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.