NavigationBasicSample crash when `navigate` after `popupTo`
See original GitHub issueI build NavigationBasicSample on Pixel XL 2 emulator API 28.
Step1: Match navigate action_match_to_in_game Step2: InGame navigate action_in_game_to_gameOver Step3: Back press to Match Step4: Match navigate action_match_to_in_game crash
Note: if in Step3 we press [Try Again?] to use popupTo, the app has no crash.
08-02 11:34:53.842 2885-2885/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.android.navigationsample, PID: 2885
java.lang.IllegalArgumentException: navigation destination com.example.android.navigationsample:id/action_match_to_in_game is unknown to this NavController
at androidx.navigation.NavController.navigate(NavController.java:669)
at androidx.navigation.NavController.navigate(NavController.java:628)
at androidx.navigation.NavController.navigate(NavController.java:616)
at com.example.android.navigationsample.Match$onCreateView$1.onClick(Match.kt:36)
at android.view.View.performClick(View.java:6597)
at android.view.View.performClickInternal(View.java:6574)
at android.view.View.access$3100(View.java:778)
at android.view.View$PerformClick.run(View.java:25885)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Issue Analytics
- State:
- Created 5 years ago
- Comments:13
Top Results From Across the Web
Android navigation component with bottom ...
I have a main nav graph with included subgraphs to provide multiple back stacks with bottom navigation view.
Read more >Global actions
To create a global action, do the following: ... Click the Text tab to navigate to the XML text view. The XML for...
Read more >Wrong animation applied when navigating using `popUpTo`
Hello, I'm experiencing a issue and I don't know if it's a bug in the navigation component or I just misunderstand it. I...
Read more >The recommended substitute for clearTask of popUpTo with ...
After it was deprecated I decided to try the recommended approach of instead setting ... https://github.com/hsson/android-navigation-component-alpha06-bug
Read more >Jetpack Navigation Component in One Video - YouTube
Android Jetpack and architecture courses: https://codingwithmitch.com/courses/In this video I show you everything you need to know to get ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had similar problem with my own code. It was caused by version 1.0.0-alpha04 of Navigation component, it was fixed when using 1.0.0-alpha03.
bug returns on 1.0.0-alpha06 ktx