-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NavigationBasicSample] crash #446
Comments
bug returns on 1.0.0-alpha06 ktx
|
I also ran into this issue. Seems to be fixed in the alpha07 release. |
I have a similar issue with alpha07 on my project, I'll try to reproduce on this sample. |
I have the same issue with alpha07 |
Me three. |
We also noticed these errors with alpha07 (Kotlin if it matters). The root error in our case was if two navigations happened too close to one another. The navigation library will open fragment B, and then tries to perform the A -> C navigation, but looking at Fragment B's actions, which leads to a crash. Once we realised this we could easily reproduce the error. We noticed the problem in our recycler view with different items taking the user to different fragments. Edit: Improved explanation |
+1 With Alpha 07 |
Anyone tried alpha08 yet? Out just now. |
+1 With Alpha 07 |
Same happening in |
I also encountered this issue, currently patching it with mutable live data, post value, which just pushes the navigation call to the end of the event loop, which is similar to Handler().post. seems to work fine for now. |
Had the same problem in I solved it by setting my Activity |
@cedrtang can you share before and after code ? |
@kinnrot Sure. Manifest.xml After: nav_graph.xml After: My navigation flow works all the way through a particular flow then back home and can do it again. Up and back navigation works as well. I use a mix of different methods to manage my navigation: Hope it helps |
Crash still happening in |
Any ideas how to fix it ? |
Same here on alpha-11 |
My nav actions will popup to the nav, with the destination as the home fragment. Here is an example, HistoryCalendarFragment can be reached from the WeeklyFragment. This action is used when clicking on a specific week in a calendar to go to that week in the WeeklyFragment. I'm not sure if maybe this the combined use of destination and popUpTo with Inclusive that solves the issue, but I do not get this crash.
Though I have had this crash when doing something like this: As @cedrtang mentioned this seems to be an issue with popping to the root directly. I do not have SingleTop set in the Manifest. |
Please file issues with the Navigation library on the issue tracker with a sample project that reproduces your issue. |
I wrote this extensions
|
I,m fixed bug. This is working
|
TitleScreen ---> Register ---> Match ---> InGame ---> ResultsWinner/GameOver ---> Match, then click 'Back Key' back to Register, then click SIGN UP, crash.
log:
com.example.android.navigationsample E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.android.navigationsample, PID: 3184 java.lang.IllegalArgumentException: navigation destination com.example.android.navigationsample:id/action_register_to_match 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.Register$onCreateView$1.onClick(Register.kt:39) at android.view.View.performClick(View.java:6266) at android.view.View$PerformClick.run(View.java:24730) at android.os.Handler.handleCallback(Handler.java:789) at android.os.Handler.dispatchMessage(Handler.java:98) at android.os.Looper.loop(Looper.java:171) at android.app.ActivityThread.main(ActivityThread.java:6672) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:246) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:783)
就是游戏一次无论输赢,回到匹配的界面,再点击返回按钮回到登录界面,再次点登录按钮会崩溃。
原因没有找到。
英文不好,大佬看到可以帮忙翻译一下,谢谢
The text was updated successfully, but these errors were encountered: