Saturday, July 27, 2024
HomeiOS Developmentc# - MAUI .NET 8 iOS - Methodology not discovered: SkiaSharp.SKMatrix SkiaSharp.SKMatrix.MakeTranslation(single,single)

c# – MAUI .NET 8 iOS – Methodology not discovered: SkiaSharp.SKMatrix SkiaSharp.SKMatrix.MakeTranslation(single,single)


I’ve created a brand new MAUI .NET 8 mission and migrated the Xamarin types mission code.
I’m going through an exception as under when loading the SVG picture,

Unhandled Exception:
System.MissingMethodException: Methodology not discovered: SkiaSharp.SKMatrix SkiaSharp.SKMatrix.MakeTranslation(single,single)
at SkiaSharp.Prolonged.Svg.SKSvg.LoadElements(IEnumerable`1 parts, SKCanvas canvas, SKPaint stroke, SKPaint fill)
at SkiaSharp.Prolonged.Svg.SKSvg.Load(XDocument xdoc)
at SkiaSharp.Prolonged.Svg.SKSvg.Load(XmlReader reader)
at SkiaSharp.Prolonged.Svg.SKSvg.Load(Stream stream)
at SKM_MOBILE.UI.Core.Utils.CommonUtils.GetSVG(String svgName, Boolean isEnergized, Boolean inService, String imagePath)
at SkiaSharp.Views.Maui.Controls.SKCanvasView.OnPaintSurface(SKPaintSurfaceEventArgs e)
at SkiaSharp.Views.Maui.Controls.SKCanvasView.SkiaSharp.Views.Maui.ISKCanvasView.OnPaintSurface(SKPaintSurfaceEventArgs e)
at SkiaSharp.Views.Maui.Handlers.SKCanvasViewHandler.OnPaintSurface(Object sender, SKPaintSurfaceEventArgs e)
at SkiaSharp.Views.iOS.SKCanvasView.OnPaintSurface(SKPaintSurfaceEventArgs e)
at SkiaSharp.Views.iOS.SKCanvasView.Draw(CGRect rect)
at UIKit.UIApplication.UIApplicationMain(Int32 args, String[] argv, IntPtr principalClassName, IntPtr delegateClassName) in /Customers/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIApplication.cs:line 58
at UIKit.UIApplication.Major(String[] args, Kind principalClass, Kind delegateClass) in /Customers/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIApplication.cs:line 94
at SKM_MOBILE.Program.Major(String[] args) in /Customers/macmini3/Paperwork/MAUI/SKM_MOBILE/SKM_MOBILE/Platforms/iOS/Program.cs:line 13

That is my code,

svg.Load(stream); throws this exception.

utilizing (var stream = GetImageStream(svgName.Substitute(".PNG", ".svg").Substitute(".png", ".svg"), imagePath))
{
    if (stream != null)
    {
        svg = new SkiaSharp.Prolonged.Svg.SKSvg();
        svg.Load(stream);
        SVGComponentImage[$"{key}"] = svg;
    }
}

How do I resolve this problem?



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments