Search code examples
androidiosuser-interfacelottie

Lottie animation error after change color of animation


Exception : Caused by: com.airbnb.lottie.parser.moshi.JsonDataException: Expected a double but was END_ARRAY at path $.layers[3].shapes[0].it[1].c.k[3]

Describe the bug : normal animation is working but after change color of animation at https://editor.lottiefiles.com/ it crash

version of Lottie : 3.4.1

implementation "com.airbnb.android:lottie:3.4.1"

version of Android : Android 12

I thought it problem with animation I selected so I try to another animation but still it crash after I change color of animation. loot like Lottie have bug on there editor(https://editor.lottiefiles.com/)


Solution

  • you can bump lootie library to:

    implementation "com.airbnb.android:lottie:3.5.0"
    

    I made tests with your lootie file and it`s working.

    <com.airbnb.lottie.LottieAnimationView
        android:id="@+id/animation_view"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:lottie_autoPlay="true"
        app:lottie_loop="true"
        app:lottie_rawRes="@raw/test" />
    

    Your lootie