Fixed
Status Update
Comments
il...@google.com <il...@google.com> #2
This has been fixed internally in https://android-review.googlesource.com/870975 and will be available in Navigation 1.0.0-alpha10.
Now, instead of crashing, we ignore invalid deep links, printing a log message saying as much.
Now, instead of crashing, we ignore invalid deep links, printing a log message saying as much.
ch...@gmail.com <ch...@gmail.com> #3
Hi team.
The problem still occurs on version 2.2.0-rc04
The problem still occurs on version 2.2.0-rc04
il...@google.com <il...@google.com> #4
Hi, still getting crash for 2.1.0
ch...@gmail.com <ch...@gmail.com> #5
still getting crash on version 2.2.0
ap...@google.com <ap...@google.com> #6
getting crash with 2.2.1
Description
I have two Activities, MainActivity and SecondActivity. Using Navigation architecture in MainActivity, which has two fragments, such as HomeFragment and DetailFragment, the Navigation diagram is declared as follows:
Generate ViewModels in the DetailFragment onCreate with "by navGraphViewModels".
There is a button in DetailFragment, clicking it will jump to SecondActivity, when "Do not keep background Activity" is enabled, pressing the back button in SecondActivity will trigger the program crash:
If I put the vm creation declaration in the onViewCreated lifecycle or later, there will be no crashes.
Does "by navGraphViewModels" necessarily require the user to use it this way?
In my opinion, as long as the NavBackStackEntry viewModelStore corresponding to "R.id.navigation_home_flow" is in the CREATED state, it's OK, not the DetailFragment.
The Navigation version I use is 2.4.0-alpha06.
Thanks in advance if you can address my issue.