airbnb / lottie-android

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

Binary incompatibility between 6.3.0 and 6.4.0 #2479

Closed carlonzo closed 5 months ago

carlonzo commented 5 months ago

Describe the bug We recently updated in our app to 6.4.0 and we received crashes running from libraries compiled against 6.3.0

Here is a stacktrace from the crash

java.lang.NoSuchMethodError: No static method LottieAnimation(Lcom/airbnb/lottie/LottieComposition;Landroidx/compose/ui/Modifier;ZZLcom/airbnb/lottie/compose/LottieClipSpec;FIZZZLcom/airbnb/lottie/RenderMode;ZZLcom/airbnb/lottie/compose/LottieDynamicProperties;Landroidx/compose/ui/Alignment;Landroidx/compose/ui/layout/ContentScale;ZZLjava/util/Map;Lcom/airbnb/lottie/AsyncUpdates;Landroidx/compose/runtime/Composer;III)V in class Lcom/airbnb/lottie/compose/LottieAnimationKt; or its super classes (declaration of 'com.airbnb.lottie.compose.LottieAnimationKt' appears in /data/app/com.careem.acma.qa-zL-fH-NABMFzbpoValaHgg==/base.apk!classes3.dex)

We had similar issue when we bumped from 6.2.0 to 6.3.0 but did not raise a bug.

Steps To Reproduce Compile a library using Lottie 6.3.0 using LottieAnimation and run the code using 6.4.0 at runtime

gpeal commented 5 months ago

The original assumption from this issue was that @JvmOverloads would be sufficient here. However, it became clear that it was not. I added a binary compatibility checker to prevent this in the future. Sorry for the overhead here.

carlonzo commented 5 months ago

thanks for that. that will help! are we going to expect a patch on 6.4.0 to bring compatibility with 6.3.0, or we just need for everyone to jump on 6.4.0 first?