(Android Studio 3.2 Beta) - 导航架构组件配置

I a*_*ent 5 android kotlin android-studio android-architecture-navigation

我想尝试新的导航架构组件功能,所以我遵循了这个教程:https://www.youtube.com/watch?v = GOpeBbfyb6s.

我正在使用Android Studio 3.2 Beta 1.我安装了必要的依赖项,但当我尝试在项目中创建导航Android资源文件时,就像在上面的视频中一样,导航选项不会出现在选择菜单中.

我的问题:

尝试创建导航Android资源文件时,没有要选择的导航选项.我错过了安装中的任何步骤吗?

预期结果:

在此输入图像描述

我的情况:

没有选择的导航选项

我的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


}
Run Code Online (Sandbox Code Playgroud)

ian*_*ake 21

根据目前公开的问题:

根据升级时弹出的帮助> Android Studio屏幕中的新功能:

"导航编辑器是一项实验性功能,因此您必须先打开IDE的"设置/首选项"对话框,在左侧窗格中选择"Experiemental",然后选中"启用导航编辑器"旁边的复选框.

我们将更新导航文档以专门调用它.默认情况下,它将在未来的canary版本(Android Studio 3.3)上启用.

因此,您需要在Android Studio 3.2的Beta版本上手动启用导航编辑器

  • 注意:我必须重新启动Android Studio(3.2 Beta 4)才能在启用"导航编辑器"实验选项后将"导航"视为资源类型. (2认同)