NoSuchMethodError setImageAssetManager on LottieDrawable
See original GitHub issueChecklist
- My animation doesn’t use any unsupported features.
- I know what part of my animation doesn’t work.
- I have created a simplified version of my animation
- I have attached the AEP file (as a zip file so it can be attached) that only has the part of the animation that doesn’t work.
Describe the bug
Using @Composable LottieAnimation leads to a crash:
java.lang.NoSuchMethodError: No virtual method setImageAssetManager(Lcom/airbnb/lottie/manager/ImageAssetManager;)V in class Lcom/airbnb/lottie/LottieDrawable; or its super classes (declaration of 'com.airbnb.lottie.LottieDrawable' appears in /data/app/~~rC9ACFpKIQB3QFZSSWzMHA==/app.package-KUTAny4ZZcykm71TfCtL4w==/base.apk) at com.airbnb.lottie.ImageAssetDelegateSetterKt.setImageAssetManager(ImageAssetDelegateSetter.kt:10) at com.airbnb.lottie.compose.LottieAnimationKt$LottieAnimation$3.invoke(LottieAnimation.kt:120) at com.airbnb.lottie.compose.LottieAnimationKt$LottieAnimation$3.invoke(LottieAnimation.kt:106)
Because LottieDrawable does not have the method setImageAssetManager, and ImageAssetDelegateSetter tries to call this method on LottieDrawable, but instead it’s just recursive, as showed by the IDE.
What version of Lottie did you test this on? lottie-android 3.7.1-SNAPSHOT and 3.7.0 lottie-compose 1.0.0-beta09-1-SNAPSHOT and 1.0.0-beta07-1
What version of Android did you test this on? Android 12 on Pixel 4a
Steps To Reproduce Steps to reproduce the behavior:
- have a @Composable function
- use LottieAnimation @Composable, passing LottieComposition and progress taken from animateLottieCompositionAsState
- LottieCompositionSpec is RawRes
- run, it crashes with NoSuchMethodError when rendering
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:7 (2 by maintainers)
Top GitHub Comments
The deploy is green now. Can you try again? https://github.com/airbnb/lottie-android/runs/3002160816?check_suite_focus=true
You beat me to it by 4 minutes 😄 https://github.com/airbnb/lottie-android/issues/1838 I also forked the repo to reproduce the issue.