iZettle / sdk-android

Add card payments from Zettle to your own app
https://developer.zettle.com/docs/android-sdk
24 stars 20 forks source link

release-2.11.1 has references to missing com.airbnb.lottie.* classes #93

Closed planetcoops closed 5 months ago

planetcoops commented 5 months ago

Expected Behavior

Please describe the behavior you are expecting.

Compiles without the following R8 errors:

Missing class com.airbnb.lottie.LottieAnimationView (referenced from: com.airbnb.lottie.LottieAnimationView com.izettle.ui.components.movie.OttoMovie.lottieAnimationView and 7 other contexts)
Missing class com.airbnb.lottie.LottieProperty (referenced from: void com.izettle.ui.components.movie.OttoMovie.setMovieAnimationStyle(com.izettle.ui.components.illustration.OttoIllustrationStyles))
Missing class com.airbnb.lottie.model.KeyPath (referenced from: com.airbnb.lottie.model.KeyPath com.izettle.ui.components.movie.OttoMovieKeyPaths.keyPath and 4 other contexts)
Missing class com.airbnb.lottie.value.LottieFrameInfo (referenced from: java.lang.Integer com.izettle.ui.components.movie.OttoMovie.setMovieAnimationStyle$lambda-8$lambda-5(com.izettle.ui.components.movie.OttoMovie, int, com.airbnb.lottie.value.LottieFrameInfo) and 2 other contexts)
Missing class com.airbnb.lottie.value.SimpleLottieValueCallback (referenced from: void com.izettle.ui.components.movie.OttoMovie.setMovieAnimationStyle(com.izettle.ui.components.illustration.OttoIllustrationStyles))

Current Behavior

What is the current behavior?

More of a heads up than anything else that the R8 compilation fails with the following missing class errors:

Missing class com.airbnb.lottie.LottieAnimationView (referenced from: com.airbnb.lottie.LottieAnimationView com.izettle.ui.components.movie.OttoMovie.lottieAnimationView and 7 other contexts)
Missing class com.airbnb.lottie.LottieProperty (referenced from: void com.izettle.ui.components.movie.OttoMovie.setMovieAnimationStyle(com.izettle.ui.components.illustration.OttoIllustrationStyles))
Missing class com.airbnb.lottie.model.KeyPath (referenced from: com.airbnb.lottie.model.KeyPath com.izettle.ui.components.movie.OttoMovieKeyPaths.keyPath and 4 other contexts)
Missing class com.airbnb.lottie.value.LottieFrameInfo (referenced from: java.lang.Integer com.izettle.ui.components.movie.OttoMovie.setMovieAnimationStyle$lambda-8$lambda-5(com.izettle.ui.components.movie.OttoMovie, int, com.airbnb.lottie.value.LottieFrameInfo) and 2 other contexts)
Missing class com.airbnb.lottie.value.SimpleLottieValueCallback (referenced from: void com.izettle.ui.components.movie.OttoMovie.setMovieAnimationStyle(com.izettle.ui.components.illustration.OttoIllustrationStyles))

Can be suppressed by adding the following lines to proguard-rules.txt

-dontwarn com.airbnb.lottie.LottieAnimationView
-dontwarn com.airbnb.lottie.LottieProperty
-dontwarn com.airbnb.lottie.model.KeyPath
-dontwarn com.airbnb.lottie.value.LottieFrameInfo
-dontwarn com.airbnb.lottie.value.SimpleLottieValueCallback

or by adding the following dependency:

implementation 'com.airbnb.android:lottie:6.3.0'

Is the latter the way to proceed?

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

Compile with release-2.11.1

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

Failure Logs

Please include any relevant log snippets or files here.

CheZhongSdk commented 5 months ago

Hi @planetcoops, Thanks for reaching out! We tested our example apps, but couldn't reproduce the issue you reported. Zettle SDK should not force you to import Lottie library. Did the previous SDK version 2.6.7 work for you?

planetcoops commented 5 months ago

Yes, the previous SDK 2.6.7 was fine.

On Thu, 15 Feb 2024 at 13:40, Che Zhong @.***> wrote:

Hi @planetcoops https://github.com/planetcoops, Thanks for reaching out! We tested our example apps, but couldn't reproduce the issue you reported. Zettle SDK should not force you to import Lottie library. Did the previous SDK version 2.6.7 work for you?

— Reply to this email directly, view it on GitHub https://github.com/iZettle/sdk-android/issues/93#issuecomment-1946118707, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJTOS6HB7VZ6OSXC56I2HTYTYF6RAVCNFSM6AAAAABDIRBFUGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBWGEYTQNZQG4 . You are receiving this because you were mentioned.Message ID: @.***>

planetcoops commented 5 months ago

Has Lottie been used to add animations for the "New UI style inspired by PayPal" in this release, specifically in the com.izettle.ui.components.movie.OttoMovieclass? OttoMovie has a field com.izettle.ui.components.movie.OttoMovie.lottieAnimationView .

Do I add proguard -dontwarn to suppress or add the Lottie dependency?

CheZhongSdk commented 5 months ago

SDK doesn't use OttoMovie, so it's safe to add -dontwarn to suppress it. We will fix this in the next SDK release. Thank you for your feedback!

planetcoops commented 5 months ago

Thank you for the clarification.