Baseflow / LottieXamarin

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

Dependency issue with Square.OkIO #397

Open mttpvn opened 9 months ago

mttpvn commented 9 months ago

🐛 Bug Report

When building with SDK Linking mode I'm getting an error related to the Square.OkIO dependency. I'm referencing another project that's using the latest version of Square.OkIO.

The error I'm getting is the following:

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Legacy.targets(649,5): error XALNK7000: Mono.Linker.MarkException: Error processing method: 'Airbnb.Lottie.Parsers.Moshi.JsonReader Airbnb.Lottie.Parsers.Moshi.JsonReader::Of(Square.OkIO.IBufferedSource)' in assembly: 'Airbnb.Lottie.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve Square.OkIO.IBufferedSource

Version: 4.2.2

Platform:

LeoJHarris commented 8 months ago

Having the same issue. Trying to find a solution to this....

LeoJHarris commented 8 months ago

@mttpvn I resolved this with the following package:

PavloLukianets commented 8 months ago

I am having a similar issue but with AndroidX.Collection : Error XALNK7000 : Mono.Linker.MarkException: Error processing method: 'AndroidX.Collection.SparseArrayCompat Com.Airbnb.Lottie.LottieComposition::get_Characters()' in assembly: 'Lottie.Android.dll'.

AlejandroLemusR commented 8 months ago

I am having a similar issue but with AndroidX.Collection : Error XALNK7000 : Mono.Linker.MarkException: Error processing method: 'AndroidX.Collection.SparseArrayCompat Com.Airbnb.Lottie.LottieComposition::get_Characters()' in assembly: 'Lottie.Android.dll'.

Hi @PavloLukianets , did you find the solution? I am also having the same error.

LeoJHarris commented 8 months ago

@AlejandroLemusR adding my two cents I just started getting the exact issue you mentioned regarding AndroidX.Collection and we have since dropped the LottieXamarin nuget, its now working again. I think you need to get the right NuGet versions for a successful build but it seemed to fragile trying to maintain support for Lottie as other NuGet need to be updated time to time.

Hopefully we can bring it back when we migrate to MAUI eventually.

angularsen commented 7 months ago

Related: #398

katkusmt commented 5 months ago

AppCompat did not resolve the issue mentioned by @PavloLukianets and @AlejandroLemusR. Anyone got any solutions to the issue? We need to update other nuggets due to critical safety and crash updates.