T.Y. Kucuk
T.Y. Kucuk

Reputation: 477

SkiaSharp SKSvg.Load throws MissingMethodException

I use SkiaSharp libraries on my Xamarin.Core/Xamarin.iOS project. I try to load an SVG file from the Core library like the following;

 var svg = new SKSvg();

 Assembly assembly = type.GetTypeInfo().Assembly;

 using (Stream stream = assembly.GetManifestResourceStream($"{assembly.GetName().Name}.Images.watermark_light.svg"))
 {
     svg.Load(stream);
 }

The code throws on the "Load" step saying "System.MissingMethodException: Method not found: SkiaSharp.SKTextBlob SkiaSharp.SKTextBlob.CreatePositioned(string,SkiaSharp.SKFont,System.ReadOnlySpan`1<SkiaSharp.SKPoint>)"

My configuration:

Libraries

I tried to add SKTextBlob reference to LinkerPleaseInclude.cs as well. But, it should not be the case when the linker behaviour is set to "Don't link". Also a added --linkskip argument for the relevant namespace. None of them worked. Any ideas about the issue?

Thanks!

Upvotes: 1

Views: 1226

Answers (1)

Wiesław Šolt&#233;s
Wiesław Šolt&#233;s

Reputation: 3314

Try updating to version 0.5.16 https://www.nuget.org/packages/Svg.Skia/0.5.16

Upvotes: 2

Related Questions