https://kotlinlang.org logo
Title
m

marios proto

02/03/2022, 4:20 PM
👋 I get this exception on a release build only, when using an abstactcomposeview inside a coordinator layout
ViewTreeLifecycleOwner not found from androidx.coordinatorlayout.widget.CoordinatorLayout
Is this a known issue? Any [G] here that might help perhaps? I can see similar issues on issue tracker, but all recommended that appcompat 1.3+ would fix this, but I am seeing in on 1.41.
s

Scott Kruse

02/03/2022, 6:43 PM
Do you have the same version for fragment and activity?
m

marios proto

02/03/2022, 7:05 PM
version.androidx.fragment=1.4.0
version.androidx.activity=1.4.0
version.androidx.constraintlayout=2.1.3
version.androidx.appcompat=1.4.1
these are the versions I use
and material design 1.4.0
ok, to anyone that might occur as an exception, the reason was not calling setContentView in the Activity, as this is where the ViewTreeXXX-Owners are initialised. a good explanation here https://medium.com/@sidhantrajora/the-interesting-case-of-viewtree-owner-87da772519c4