Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
Steps to reproduce bug :
1. create a simple ValueAnimator XML
2. use AnimatorInflaterCompat.loadAnimator to create ValueAnimator
3. run the app in any api < 24
Result :
The app will crashed due to java.lang.ClassCastException: android.animation.ValueAnimator cannot be cast to android.animation.ObjectAnimator
I have attached the full detail below.
As what caused this error, it occurs in AnimatorInfalterCompat
In this function, before it pass TypedArray arrayObjectAnimator into parseAnimatorFromTypeArray method, instead of creating arrayObjectAnimator directly, it should check if ValueAnimator anim is null, just like how AnimatorInflater does :
So a possible fix is simply add a flag before passing arrayObjectAnimator into the function:
============================================================================================