airbnb / lottie-android

Render After Effects animations natively on Android and iOS, Web, and React Native
http://airbnb.io/lottie/
Apache License 2.0
35.02k stars 5.42k forks source link

Lottie Animation does not render on android but works fine on ios #2575

Open jojoclt opened 1 week ago

jojoclt commented 1 week ago

Describe the bug This animation does not show at all on Android Jetpack Compose, but works fine on ios version.

What version of Lottie did you test this on? 6.5.2 and 6.6.0

What version of Android did you test this on? 12 Steps To Reproduce Steps to reproduce the behavior: Try this link

Screenshots

MeetGori1 commented 4 days ago

android version : 14 lottie version: 6.6.0

loaded this animation with android xml

and got crash:

FATAL EXCEPTION: main

                                            java.lang.IllegalStateException: Unable to parse composition
                                                at com.airbnb.lottie.LottieAnimationView.lambda$static$0(LottieAnimationView.java:74)
                                                at com.airbnb.lottie.LottieAnimationView$$ExternalSyntheticLambda1.onResult(D8$$SyntheticClass:0)
                                                at com.airbnb.lottie.LottieAnimationView$WeakFailureListener.onResult(LottieAnimationView.java:116)
                                                at com.airbnb.lottie.LottieAnimationView$WeakFailureListener.onResult(LottieAnimationView.java:98)
                                                at com.airbnb.lottie.LottieTask.notifyFailureListeners(LottieTask.java:179)
                                                at com.airbnb.lottie.LottieTask.notifyListenersInternal(LottieTask.java:156)
                                                at com.airbnb.lottie.LottieTask.$r8$lambda$AdJFAWRq87LYDwF2-gMLZe0_AkA(Unknown Source:0)
                                                at com.airbnb.lottie.LottieTask$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0)
                                                at android.os.Handler.handleCallback(Handler.java:958)
                                                at android.os.Handler.dispatchMessage(Handler.java:99)
                                                at android.os.Looper.loopOnce(Looper.java:205)
                                                at android.os.Looper.loop(Looper.java:294)
                                                at android.app.ActivityThread.main(ActivityThread.java:8177)
                                                at java.lang.reflect.Method.invoke(Native Method)
                                                at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
                                                at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
                                            Caused by: java.lang.NumberFormatException: For input string: "d9.0147ae147aedf.fdf3b645a1c8e6.028f5c28f5c8" under radix 16
                                                at java.lang.Long.parseLong(Long.java:751)
                                                at android.graphics.Color.parseColor(Color.java:1385)
                                                at com.airbnb.lottie.parser.LayerParser.parse(LayerParser.java:142)
                                                at com.airbnb.lottie.parser.LottieCompositionMoshiParser.parseLayers(LottieCompositionMoshiParser.java:120)
                                                at com.airbnb.lottie.parser.LottieCompositionMoshiParser.parse(LottieCompositionMoshiParser.java:86)
                                                at com.airbnb.lottie.LottieCompositionFactory.fromJsonReaderSyncInternal(LottieCompositionFactory.java:493)
                                                at com.airbnb.lottie.LottieCompositionFactory.fromJsonReaderSync(LottieCompositionFactory.java:483)
                                                at com.airbnb.lottie.LottieCompositionFactory.fromJsonReaderSync(LottieCompositionFactory.java:477)
                                                at com.airbnb.lottie.LottieCompositionFactory.fromRawResSync(LottieCompositionFactory.java:363)
                                                at com.airbnb.lottie.LottieCompositionFactory.lambda$fromRawRes$3(LottieCompositionFactory.java:318)
                                                at com.airbnb.lottie.LottieCompositionFactory$$ExternalSyntheticLambda10.call(D8$$SyntheticClass:0)
                                                at java.util.concurrent.FutureTask.run(FutureTask.java:264)
                                                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
                                                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
                                                at java.lang.Thread.run(Thread.java:1012)
jojoclt commented 4 days ago

android version : 14 lottie version: 6.6.0

loaded this animation with android xml

and got crash:

FATAL EXCEPTION: main Process: com.controlla.rokuremoteapp, PID: 9136 java.lang.IllegalStateException: Unable to parse composition at com.airbnb.lottie.LottieAnimationView.lambda$static$0(LottieAnimationView.java:74) at com.airbnb.lottie.LottieAnimationView$$ExternalSyntheticLambda1.onResult(D8$$SyntheticClass:0) at com.airbnb.lottie.LottieAnimationView$WeakFailureListener.onResult(LottieAnimationView.java:116) at com.airbnb.lottie.LottieAnimationView$WeakFailureListener.onResult(LottieAnimationView.java:98) at com.airbnb.lottie.LottieTask.notifyFailureListeners(LottieTask.java:179) at com.airbnb.lottie.LottieTask.notifyListenersInternal(LottieTask.java:156) at com.airbnb.lottie.LottieTask.$r8$lambda$AdJFAWRq87LYDwF2-gMLZe0_AkA(Unknown Source:0) at com.airbnb.lottie.LottieTask$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0) at android.os.Handler.handleCallback(Handler.java:958) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:205) at android.os.Looper.loop(Looper.java:294) at android.app.ActivityThread.main(ActivityThread.java:8177) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971) Caused by: java.lang.NumberFormatException: For input string: "d9.0147ae147aedf.fdf3b645a1c8e6.028f5c28f5c8" under radix 16 at java.lang.Long.parseLong(Long.java:751) at android.graphics.Color.parseColor(Color.java:1385) at com.airbnb.lottie.parser.LayerParser.parse(LayerParser.java:142) at com.airbnb.lottie.parser.LottieCompositionMoshiParser.parseLayers(LottieCompositionMoshiParser.java:120) at com.airbnb.lottie.parser.LottieCompositionMoshiParser.parse(LottieCompositionMoshiParser.java:86) at com.airbnb.lottie.LottieCompositionFactory.fromJsonReaderSyncInternal(LottieCompositionFactory.java:493) at com.airbnb.lottie.LottieCompositionFactory.fromJsonReaderSync(LottieCompositionFactory.java:483) at com.airbnb.lottie.LottieCompositionFactory.fromJsonReaderSync(LottieCompositionFactory.java:477) at com.airbnb.lottie.LottieCompositionFactory.fromRawResSync(LottieCompositionFactory.java:363) at com.airbnb.lottie.LottieCompositionFactory.lambda$fromRawRes$3(LottieCompositionFactory.java:318) at com.airbnb.lottie.LottieCompositionFactory$$ExternalSyntheticLambda10.call(D8$$SyntheticClass:0) at java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644) at java.lang.Thread.run(Thread.java:1012)

https://1drv.ms/u/s!AjHb7JQSeyoru9o_hpoFYklY_1489g?e=HSQQJe can you try this .json file again? Thanks

MeetGori1 commented 3 days ago

app crashed:

java.lang.IllegalStateException: Unable to parse composition at com.airbnb.lottie.LottieAnimationView.lambda$static$0(LottieAnimationView.java:74) at com.airbnb.lottie.LottieAnimationView$$ExternalSyntheticLambda1.onResult(D8$$SyntheticClass:0) at com.airbnb.lottie.LottieAnimationView$WeakFailureListener.onResult(LottieAnimationView.java:116) at com.airbnb.lottie.LottieAnimationView$WeakFailureListener.onResult(LottieAnimationView.java:98) at com.airbnb.lottie.LottieTask.notifyFailureListeners(LottieTask.java:179) at com.airbnb.lottie.LottieTask.notifyListenersInternal(LottieTask.java:156) at com.airbnb.lottie.LottieTask.$r8$lambda$AdJFAWRq87LYDwF2-gMLZe0_AkA(Unknown Source:0) at com.airbnb.lottie.LottieTask$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0) at android.os.Handler.handleCallback(Handler.java:958) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:205) at android.os.Looper.loop(Looper.java:294) at android.app.ActivityThread.main(ActivityThread.java:8177) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971) Caused by: java.lang.NumberFormatException: For input string: "d9.0147ae147aedf.fdf3b645a1c8e6.028f5c28f5c8" under radix 16 at java.lang.Long.parseLong(Long.java:751) at android.graphics.Color.parseColor(Color.java:1385) at com.airbnb.lottie.parser.LayerParser.parse(LayerParser.java:142) at com.airbnb.lottie.parser.LottieCompositionMoshiParser.parseLayers(LottieCompositionMoshiParser.java:120) at com.airbnb.lottie.parser.LottieCompositionMoshiParser.parse(LottieCompositionMoshiParser.java:86) at com.airbnb.lottie.LottieCompositionFactory.fromJsonReaderSyncInternal(LottieCompositionFactory.java:493) at com.airbnb.lottie.LottieCompositionFactory.fromJsonReaderSync(LottieCompositionFactory.java:483) at com.airbnb.lottie.LottieCompositionFactory.fromJsonReaderSync(LottieCompositionFactory.java:477) at com.airbnb.lottie.LottieCompositionFactory.fromRawResSync(LottieCompositionFactory.java:363) at com.airbnb.lottie.LottieCompositionFactory.lambda$fromRawRes$3(LottieCompositionFactory.java:318) at com.airbnb.lottie.LottieCompositionFactory$$ExternalSyntheticLambda10.call(D8$$SyntheticClass:0)