You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
androidx MotionLayout does not inflate when running a test, crashes instead.
Crashlog below:
LoadingScreenTest > testLoadingScreen FAILED
android.view.InflateException: Binary XML file line #12: Error inflating class androidx.constraintlayout.motion.widget.MotionLayout
Caused by:
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
at android.view.LayoutInflater.createView(LayoutInflater.java:866)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1018)
at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:321)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:973)
at android.view.LayoutInflater.inflate(LayoutInflater.java:667)
at android.view.LayoutInflater.inflate(LayoutInflater.java:505)
at android.view.BridgeInflater.inflate(BridgeInflater.java:395)
at app.cash.paparazzi.PaparazziSdk.inflate(PaparazziSdk.kt:167)
at app.cash.paparazzi.Paparazzi.inflate(Paparazzi.kt:98)
at com.defaultui.snapshot.LoadingScreenTest.setUp(LoadingScreenTest.kt:17)
Caused by:
java.lang.NullPointerException: Cannot read field "type" because the return value of "android.content.res.TypedArray.peekValue(int)" is null
at androidx.constraintlayout.motion.widget.KeyAttributes$Loader.read(KeyAttributes.java:402)
at androidx.constraintlayout.motion.widget.KeyAttributes.load(KeyAttributes.java:73)
at androidx.constraintlayout.motion.widget.KeyFrames.<init>(KeyFrames.java:115)
at androidx.constraintlayout.motion.widget.MotionScene.load(MotionScene.java:1275)
at androidx.constraintlayout.motion.widget.MotionScene.<init>(MotionScene.java:1190)
at androidx.constraintlayout.motion.widget.MotionLayout.init(MotionLayout.java:4019)
at androidx.constraintlayout.motion.widget.MotionLayout.<init>(MotionLayout.java:1159)
... 15 more
1 test completed, 1 failed
> Task :defaultui:testDebugUnitTest FAILED
FAILURE: Build failed with an exception.
Only seems to happen with androidx.constraintlayout:constraintlayout:2.2.0
When I downgrade to version 2.1.4, the layout inflates as expected. ConstraintLayout itself always inflates fine.
Steps to Reproduce
Try to do a test run that inflates any androidx.constraintlayout.motion.widget.MotionLayout layout, using andoridx constraintlayout version 2.2.0
Expected behavior NullPointerException should not happen, layout should inflate
Additional information:
Paparazzi Version: 1.3.5
OS: Mac Sonoma 14.6.1
Compile SDK: 35
Gradle Version: 8.9
Android Gradle Plugin Version: 8.7.3
The text was updated successfully, but these errors were encountered:
Description
androidx
MotionLayout
does not inflate when running a test, crashes instead.Crashlog below:
Only seems to happen with
androidx.constraintlayout:constraintlayout:2.2.0
When I downgrade to version 2.1.4, the layout inflates as expected.
ConstraintLayout
itself always inflates fine.Steps to Reproduce
Try to do a test run that inflates any
androidx.constraintlayout.motion.widget.MotionLayout
layout, using andoridx constraintlayout version 2.2.0Expected behavior
NullPointerException
should not happen, layout should inflateAdditional information:
The text was updated successfully, but these errors were encountered: