Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency issue with Square.OkIO #397

Open
1 task
mttpvn opened this issue Oct 26, 2023 · 7 comments
Open
1 task

Dependency issue with Square.OkIO #397

mttpvn opened this issue Oct 26, 2023 · 7 comments

Comments

@mttpvn
Copy link

mttpvn commented Oct 26, 2023

馃悰 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:

  • 馃 Android
@LeoJHarris
Copy link

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

@LeoJHarris
Copy link

LeoJHarris commented Nov 6, 2023

@mttpvn I resolved this with the following package:

  • Square.OkHttp3 v4.9.2

@PavloLukianets
Copy link

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
Copy link

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
Copy link

@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
Copy link
Contributor

Related: #398

angularsen added a commit to angularsen/LottieXamarin that referenced this issue Dec 9, 2023
Fixes Baseflow#398

Related:
Baseflow#397
xamarin/AndroidX#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
- Update `Xamarin.AndroidX.AppCompat` from 1.3.1.3 to 1.6.1.6
- Change Android target from monoandroid10.0 to monoandroid12.0 to support newest AndroidX package

### 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?
@katkusmt
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants