相关疑难解决方法(0)

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

我想尝试新的导航架构组件功能,所以我遵循了这个教程: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)

android kotlin android-studio android-architecture-navigation

5
推荐指数
1
解决办法
1488
查看次数

android studio中没有导航编辑器

我正在努力研究最近作为架构组件的一部分引入的这个新导航编辑器.

参考:https://youtu.be/8GCXtCjtg40?t = 311

我添加了文档https://developer.android.com/topic/libraries/architecture/adding-components#navigation中提到的depdencies.

我的假设是引入了一种名为"导航"的新"资源类型".当我在项目中添加"导航"文件时,android studio会让我以两种模式查看该文件,文本和设计,我认为设计模式是"导航编辑器"

我尝试了文档中给出的内容. https://developer.android.com/topic/libraries/architecture/navigation/navigation-implementing 右键单击'res'文件夹 - >新资源文件 - > resouce type - 'Navigation'.但是,我找不到名为'导航'的资源类型

但是我能够创建一个类型为"Navigation"的资源目录,并在目录中添加一个xml文件,但android studio没有该文件的设计模式.

为什么我没有看到这种"导航"资源类型?

android

3
推荐指数
1
解决办法
3182
查看次数