Baseflow / LottieXamarin

Render After Effects animations natively on Android, iOS, MacOS and TvOS for Xamarin
https://baseflow.com
Apache License 2.0
1.22k stars 261 forks source link

Fix linker issue by upgrading Xamarin.AndroidX.AppCompat #399

Closed angularsen closed 10 months ago

angularsen commented 11 months ago

Fixes #398

Related:

397

https://github.com/xamarin/AndroidX/issues/821

After upgrading AndroidX packages in our Xamarin Forms Android project, the linker fails on LottieXamarin using some outdated version of AndroidX types.

Error Mono.Linker.MarkException: Error processing method: 'AndroidX.Collection.SparseArrayCompat Com.Airbnb.Lottie.LottieComposition::get_Characters()' in assembly: 'Lottie.Android.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve AndroidX.Collection.SparseArrayCompat

Changes

Notes

This needs some assistance to fit into the latest changes of develop with net6.0 / maui. I'm not sure if this is experimental or not, but I was not able to build it.

The PR is currently based on the commit prior to net6.0 / maui update, since our team is currently stuck on standard Xamarin Forms for some time and it solves our need. Maybe we can multi-target both monoandroid12.0 and android-net6.0 to continue support for old Xamarin?

angularsen commented 11 months ago

Just a heads up, but I will not be pursuing this PR as we switched to another library instead.

https://github.com/mono/SkiaSharp.Extended (must use prerelease nugets as of now)

This article was helpful although it explains for MAUI: https://cedricgabrang.medium.com/implementing-lottie-animations-in-your-net-maui-application-62bd484af651

I'll leave the PR open for anyone stumbling into this later or if you wish to take over the PR.

malo-bo commented 11 months ago

@martijn00 , please consider updating using this PR

logikonline commented 11 months ago

Someone merge this and release it - it takes no effort to resolve this

JoelRamosM commented 10 months ago

Pleaase... Someone merge this and release it. @malo-bo can i replicate this PR?

georgeemr commented 10 months ago

Please I need this PR too

JoelRamosM commented 10 months ago

@martijn00 whats is the process to release it? there's some CI/CD automation that do i t?

softlion commented 8 months ago

try this gist instead:

https://gist.github.com/softlion/fad8ab6a37809e169d4fcc6b81b0f57b