saveBackStack("fc0f21ca-4f5c-4717-a0db-0bb7e72e9ad2") must be self contained and not reference fragments from non-saved FragmentTransactions. Found reference to fragment HomeFragment{1605ec4} (504fd414-de6f-475b-bfe6-6f4463ce076e id=0x7f090216 tag=224d9138-7114-4b1f-8d70-f4e8a243ab03) in BackStackEntry{916cdf7 #2 fc0f21ca-4f5c-4717-a0db-0bb7e72e9ad2} that were previously added to the FragmentManager through a separate FragmentTransaction.
Seems to be occurring after updating to navigation 2.8.0. The activity is using the navigation dsl. Cannot seem to reproduce this crash though..
not kotlin but kotlin colored 2
Tyler Turnbull
10/01/2024, 5:59 PM
@kenkyee my bad, is there a more appropriate slack for Android specific questions?
k
kenkyee
10/01/2024, 6:07 PM
see the slack channel description
kenkyee
10/01/2024, 6:08 PM
Screenshot 2024-10-01 at 2.08.04 PM.png
t
Tyler Turnbull
10/01/2024, 6:58 PM
ahh jeez 🤦
thank you!
👍 1
b
Binod Basnet
10/02/2024, 8:35 AM
It seems like back pressed is goes in loop which cause crash. I resolve this issues by overriding onBackPress like
overide fun onBackPress()
{
finish()
}
Note that iam not using super.onBackPress()