(Android Studio 3.2 Beta) - 导航架构组件配置
(Android Studio 3.2 Beta) - Navigation Architecture Component Configuration
我想尝试新的导航架构组件功能,所以我遵循了这个教程:https://www.youtube.com/watch?v=GOpeBbfyb6s。
我正在使用 Android Studio 3.2 Beta 1。我安装了必要的依赖项,但是当我尝试在中创建 导航 Android 资源文件 该项目就像上面的视频一样,Navigation 选项没有出现在 selection 菜单中。
我的问题:
尝试创建导航Android资源文件时,select没有导航选项。我是否遗漏了任何安装步骤?
预期结果:
我的情况:
我的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
}
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.
因此您需要在 Android Studio 3.2
的 Beta 版本中手动启用导航编辑器
我在创建新资源文件时遇到了同样的问题 Navigation Type 。
导航编辑器工具仅在 Android Studio 3.2 Canary 中可用。
我尝试手动启用导航编辑器:
文件 → 设置 → 实验 → 启用导航编辑器
导航选项仍然没有出现在选择菜单中。
重启androidstudio后就会出现
注意:我关注了这个link
https://developer.android.com/topic/libraries/architecture/navigation/navigation-implementing
我想尝试新的导航架构组件功能,所以我遵循了这个教程:https://www.youtube.com/watch?v=GOpeBbfyb6s。
我正在使用 Android Studio 3.2 Beta 1。我安装了必要的依赖项,但是当我尝试在中创建 导航 Android 资源文件 该项目就像上面的视频一样,Navigation 选项没有出现在 selection 菜单中。
我的问题:
尝试创建导航Android资源文件时,select没有导航选项。我是否遗漏了任何安装步骤?
预期结果:
我的情况:
我的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
}
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.
因此您需要在 Android Studio 3.2
的 Beta 版本中手动启用导航编辑器我在创建新资源文件时遇到了同样的问题 Navigation Type 。
导航编辑器工具仅在 Android Studio 3.2 Canary 中可用。
我尝试手动启用导航编辑器: 文件 → 设置 → 实验 → 启用导航编辑器
导航选项仍然没有出现在选择菜单中。
重启androidstudio后就会出现
注意:我关注了这个link https://developer.android.com/topic/libraries/architecture/navigation/navigation-implementing