Fixed
Status Update
Comments
cl...@google.com <cl...@google.com>
an...@google.com <an...@google.com>
ap...@google.com <ap...@google.com> #2
A couple of questions:
1. Have you saw crash in real device or only in simulators?
2. Do you use dynamic feature for language ID?
1. Have you saw crash in real device or only in simulators?
2. Do you use dynamic feature for language ID?
Description
Jetpack Compose release version: 1.0.0-beta02
Developers not using AppCompat version 1.3+ nor Fragment 1.3+ can hit this error (i.e. the need of manually setting owners for
ComposeView
ViewTreeLifecycleOwner
andViewTreeSavedStateRegistryOwner
) when usingComposeView
in a XML file even thoughComposeView
'ssetContent
method hasn't been called.These checks seem too aggressive and are done way earlier they're expected. I'd expect these checks to be called when
setContent
is called, not before.The workaround seen in the community is creating a
ComposeViewStub
that they use in XML and replace with aComposeView
at runtime. Then, LayoutParams and id are reassigned, the right owners are set, andsetContent
is called.