When I am trying to add a destination when clicking "New destination" button, from the dropdown list I am not able to see any fragments which are already there in my project.
I also face this issue when I am trying to add a blank fragment by clicking "Create a blank destination" option from the drop down.
I tried restarting the IDE, and this Android Navigation Component Not Displaying Fragment but it doesn't resolve my issue.
Navigation dependency: implementation "androidx.navigation:navigation-fragment:1.0.0-rc02"
My project is already migrated to AndroidX.
Am I missing something? Any help would be appreciated.
Gradle dependency:
def nav_version = "1.0.0-rc02"
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0-alpha02'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.material:material:1.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.2-alpha02'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0-alpha02'
implementation 'androidx.cardview:cardview:1.0.0'
implementation "android.arch.navigation:navigation-fragment:$nav_version"
The navigation editor is a standard part of Android Studio 3.3 and higher. If you're using Android Studio 3.2, navigation is an experimental feature and you'll need to enable it: Click File > Settings (Android Studio > Preferences on Mac) Select the Experimental category in the left pane.
I had the same problem. Just use these dependencies.
//Android Navigation Architecture
implementation "androidx.navigation:navigation-fragment-ktx:2.1.0-alpha05"
implementation "androidx.navigation:navigation-ui-ktx:2.1.0-alpha05"
I had the same problem and i solved it by simply checking the superior build-gradle for the kotlin version, it may be the case if you recently updated your kotlin plugin but didnt update your code.
So in android studio in project navigation bar(ANDROID): Gradle Scripts -> build.gradle(project) -> look for buildscript - ext and update "kotlin_version" for your kotlin plugin version (this can be checked in tools -> kotlin -> Configure kotlin plugin updates)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With