Running an Android app with R8 shrinking results in Java.Lang.IllegalStateException: FragmentManager has not been attached to a host. #26074
Labels
s/triaged
Issue has been reviewed
s/verified
Verified / Reproducible Issue ready for Engineering Triage
t/bug
Something isn't working
Description
Running the sample app in AdHoc config crashes with
Java.Lang.IllegalStateException: FragmentManager has not been attached to a host.
Although this is Android-specific, the stack trace is in MAUI code, so this is where the issue is entered.
There is an attempt to preserve code using ProGuard configuration. It's possible there is some code being stripped out that is needed, but it's not clear what that is.
For some reason, Release mode doesn't seem to use the shrinking(?) Could be something wrong I have set in my project.
Steps to Reproduce
AdHoc
configuration.Link to public reproduction project repository
https://github.com/brunck/reproductions/tree/master/AndroidFragmentManagerError
Version with bug
9.0.0 GA
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
No response
Affected platforms
Android
Affected platform versions
35
Did you find any workaround?
Don't use code shrinking/ProGuard configuration.
Relevant log output
Stack Trace
The text was updated successfully, but these errors were encountered: