I'm using compose version compose-bom 2023.03.00 and when I try to add the latest compose animation module (1.7.0-alpha07) with shared elements update, the app crashes on launch with error showing
java.lang.NoSuchMethodError: No static method restrictedConstraints-xF2OJ5Q$default(Landroidx/compose/ui/unit/Constraints$Companion;IIIIZILjava/lang/Object;)J in class Landroidx/compose/ui/unit/Constraints$Companion; or its super classes (declaration of 'androidx.compose.ui.unit.Constraints$Companion' appears in /data/app/com.xx.xxxx-55o2y0IBA6N3Qr0mj4DgbQ==/base.apk
at androidx.compose.foundation.layout.RowColumnMeasurementHelper.measureWithoutPlacing-EkL-Y(RowColumnMeasurementHelper.kt:187) at androidx.compose.foundation.layout.RowColumnMeasurePolicy.measure-3p2s80s(RowColumnImpl.kt:69) at androidx.compose.ui.node.InnerNodeCoordinator.measure-BRTryo0(InnerNodeCoordinator.kt:135) at androidx.compose.foundation.layout.SizeNode.measure-3p2s80s(Size.kt:838)
Just adding the dependency itself causes the crash (without adding any ShareElementsLayout etc).
IN a sample app, it works fine. Is it due to any compatibility issues with other compose libraries ? How can I find the issue due to incompatibility issues ?
I tried matching the sample app's dependency versions (1.7.0-beta01 also has issues), but there are other libraries also found in our main app.
It also created the same crash.