LottieXamarin icon indicating copy to clipboard operation
LottieXamarin copied to clipboard

Dependency issue with Square.OkIO

Open mttpvn opened this issue 1 year ago • 7 comments

🐛 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:

  • [ ] :robot: Android

mttpvn avatar Oct 26 '23 10:10 mttpvn

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

LeoJHarris avatar Nov 05 '23 23:11 LeoJHarris

@mttpvn I resolved this with the following package:

  • Square.OkHttp3 v4.9.2

LeoJHarris avatar Nov 06 '23 03:11 LeoJHarris

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'.

PavloLukianets avatar Nov 07 '23 12:11 PavloLukianets

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.

AlejandroLemusR avatar Nov 28 '23 23:11 AlejandroLemusR

@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.

LeoJHarris avatar Nov 29 '23 20:11 LeoJHarris

Related: #398

angularsen avatar Dec 09 '23 01:12 angularsen

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.

katkusmt avatar Feb 21 '24 10:02 katkusmt