Fixed
Status Update
Comments
il...@google.com <il...@google.com>
ap...@google.com <ap...@google.com> #2
This was fixed in https://android-review.googlesource.com/880833 and will be available in Navigation 1.0.0-alpha10.
il...@google.com <il...@google.com> #3
This has been fixed internally and will be available in the next release.
Note that the Kotlin Safe Args plugin (using apply plugin: 'androidx.navigation.safeargs.kotlin') is not affected by this bug, so if you're in a Kotlin only project, consider switching to that as a workaround.
Note that when fixing this issue, we did find another issue, filed ashttps://issuetracker.google.com/issues/123374541 that *does* affect the Kotlin code gen specifically when using a argument name with the same name as the enum class you've set as the default value (in your example app, the android:name="ToolbarType"). Feel free to star that issue to track progress on that issue and note the workaround listed there).
Note that the Kotlin Safe Args plugin (using apply plugin: 'androidx.navigation.safeargs.kotlin') is not affected by this bug, so if you're in a Kotlin only project, consider switching to that as a workaround.
Note that when fixing this issue, we did find another issue, filed as
Description
Version used: alpha11
Devices/Android versions reproduced on: Android Studio 3.4 beta 2
I found a strange case, this morning, when I was trying to integrate the new alpha11 build into a project. I've replicated a minimal test case into a project and have replicated the situation.
What I see:
During build:
/Users/nealsanche/robots/Alpha11GlobalBug/app/build/generated/source/navigation-args/debug/com/robotsandpencils/testapp/tab1/Tab1FragmentDirections.java:10: error: cannot find symbol
public static com.robotsandpencils.testapp.Tab1FragmentDirections.com.robotsandpencils.testapp.NavGraphDirections.ActionGlobalGlobalFragment actionGlobalGlobalFragment() {
^
symbol: class com
location: class Tab1FragmentDirections
/Users/nealsanche/robots/Alpha11GlobalBug/app/build/generated/source/navigation-args/debug/com/robotsandpencils/testapp/tab2/Tab2FragmentDirections.java:26: error: cannot find symbol
public static com.robotsandpencils.testapp.Tab2FragmentDirections.com.robotsandpencils.testapp.NavGraphDirections.ActionGlobalGlobalFragment actionGlobalGlobalFragment() {
^
symbol: class com
location: class Tab2FragmentDirections
/Users/nealsanche/robots/Alpha11GlobalBug/app/build/generated/source/navigation-args/debug/com/robotsandpencils/testapp/tab3/Tab3FragmentDirections.java:26: error: cannot find symbol
public static com.robotsandpencils.testapp.Tab3FragmentDirections.com.robotsandpencils.testapp.NavGraphDirections.ActionGlobalGlobalFragment actionGlobalGlobalFragment() {
^
symbol: class com
location: class Tab3FragmentDirections
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
3 errors
FAILURE: Build failed with an exception.
All I did was right click on the GlobalFragment and generated a 'global' action from the menu.