Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

(Android Studio 3.2 Beta) - Navigation Architecture Component Configuration

I want to try out the new Navigation Architecture Component feature, so I followed this Tutorial: https://www.youtube.com/watch?v=GOpeBbfyb6s.

I am using Android Studio 3.2 Beta 1. I installed the necessary dependencies, but when I try to create the Navigation Android Resource File in the project just like in the video above, the Navigation option does not appear in the selection menu.

My Issue:

There is no Navigation option to select while trying to create the Navigation Android Resource File. Am I missing any steps in the installation?

Expected Result:

enter image description here

My Situation:

No Navigation Option to Select

My build.gradle

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation"org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

    // Navigation Architecture Component Configuration install HERE!!
    def nav_version = "1.0.0-alpha02"

    implementation "android.arch.navigation:navigation-fragment-ktx:$nav_version" // use -ktx for Kotlin
    implementation "android.arch.navigation:navigation-ui-ktx:$nav_version" // use -ktx for Kotlin


}
like image 278
I am a Student Avatar asked Jun 22 '18 01:06

I am a Student


2 Answers

Per this currently open issue:

As per the Help > What's New in Android Studio screen that popped up when you upgraded:

"The Navigation Editor is an experimental feature, so you must first enable it by opening the IDE 'Settings/Preferences' dialog, selecting 'Experiemental' in the left pane, and checking the box next to the 'Enable Navigation Editor'."

We'll update the Navigation documentation to specifically call this out. It will also be enabled by default on future canary builds (of Android Studio 3.3) when available.

So you need to manually enable the Navigation Editor on Beta builds of Android Studio 3.2

like image 168
ianhanniballake Avatar answered Oct 21 '22 02:10

ianhanniballake


I have faced same issue when I create new resource file as Navigation Type .

The navigation editor tool is only available in Android Studio 3.2 Canary.

I tried to enable Navigation editor manually: File → Settings → Experimental → Enable Navigation Editor

Still the Navigation option does not appear in the selection menu.

It will appear after I restarted android studio.

Note:I followed this link https://developer.android.com/topic/libraries/architecture/navigation/navigation-implementing

like image 30
pooja Avatar answered Oct 21 '22 01:10

pooja