Redth / ResizetizerNT

Add SVG's and PNG's to your shared Xamarin Project
MIT License
318 stars 31 forks source link

Resizetizer.NT can't find libSkiaSharp on Android in Visual Studio 2022 #69

Open svaldetero opened 3 years ago

svaldetero commented 3 years ago

[I know VS 2022 is preview and changing] Resizetizer.NT errors when trying to build in Visual Studio 2022 but works in VS 2019. Diagnostic errors show:

System.TypeInitializationException: The type initializer for 'SkiaSharp.SKObject' threw an exception. ---> System.DllNotFoundException: Unable to load library 'libSkiaSharp'.
   at SkiaSharp.LibraryLoader.LoadLocalLibrary[T](String libraryName)
   at System.Lazy`1.CreateValue()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Lazy`1.get_Value()
   at SkiaSharp.SkiaApi.sk_version_get_milestone()
   at SkiaSharp.SkiaSharpVersion.get_Native()
   at SkiaSharp.SkiaSharpVersion.CheckNativeLibraryCompatible(Boolean throwIfIncompatible)
   at SkiaSharp.SKObject..cctor()
   --- End of inner exception stack trace ---
   at SkiaSharp.SKObject.get_Handle()
   at SkiaSharp.SKNativeObject.Dispose(Boolean disposing)
   at SkiaSharp.SKFileStream.Dispose(Boolean disposing)
   at SkiaSharp.SKNativeObject.Finalize()

To repro, open Sample.Android app in this repository clean and rebuild.

Inconsistently, VS 2022 would even crash just trying to open the android project after it has been Cleaned.

ysmoradi commented 3 years ago

I've the same issue

r2d2rigo commented 2 years ago

Fixed on PR #83, if you can't wait for it to be merged I also have generated a package with the changes: https://github.com/rotorsoft-ltd/ResizetizerNT/releases/tag/0.3.0-vs2022

jor1196 commented 2 years ago

is this a long way off?

sjorsmiltenburg commented 2 years ago

can we expect a merge to happen, or is resizetizer dead in the water?