-
-
Notifications
You must be signed in to change notification settings - Fork 260
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AndroidX.Collection dependency error. #398
Comments
Related: |
Fixes Baseflow#398 Related: Baseflow#397 dotnet/android-libraries#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?
Not to rain on this project, but it seems to not be actively maintained. For others running into this, there is an alternative library that is maintained by the Xamarin team, supports both Xamarin Forms and MAUI and seems fairly regularly updated. It worked well for our Xamarin Forms project and we will use that instead. https://github.com/mono/SkiaSharp.Extended (must use prerelease nugets as of now) This article was helpful although it explains for MAUI: |
any chance to get an update? |
@martijn00 |
🐛 Bug Report
Severity Code Description Project File Line Suppression State
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
at Mono.Linker.Steps.MarkStep.HandleUnresolvedType(TypeReference reference)
at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference)
at MonoDroid.Tuner.MonoDroidMarkStep.MarkType(TypeReference reference)
at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
at Mono.Linker.Steps.MarkStep.ProcessQueue()
--- End of inner exception stack trace ---
at Mono.Linker.Steps.MarkStep.ProcessQueue()
at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue()
at Mono.Linker.Steps.MarkStep.Process()
at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
at MonoDroid.Tuner.MonoDroidMarkStep.Process(LinkContext context)
at Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step)
at Mono.Linker.Pipeline.Process(LinkContext context)
at MonoDroid.Tuner.Linker.Process(LinkerOptions options, ILogger logger, LinkContext& context)
at Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res)
at Xamarin.Android.Tasks.LinkAssemblies.RunTask()
at Microsoft.Android.Build.Tasks.AndroidTask.Execute() in /Users/runner/work/1/s/xamarin-android/external/xamarin-android-tools/src/Microsoft.Android.Build.BaseTasks/AndroidTask.cs:line 17 ChartBuilder.XForms.Android
Expected behavior
Lotie package should be compatible with the latest AndroidX Libraries.
Reproduction steps
Configuration
Version: 4.1.0
Platform:
The text was updated successfully, but these errors were encountered: