Using SfListview causes exceptions

Adding the listview to my view causes exceptions. It seems not to have effect but, in android it crashes directly.

If i remove the reference, the errors are gone.

Microsoft.Maui.FontManager: Error: Error loading font 'Assets/Fonts/Roboto.ttf'.


System.ArgumentException: The parameter is incorrect.


Assets/Fonts/Roboto.ttf is not a valid absolute URI.
   at WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|39_0(Int32 hr)
   at ABI.System.WinRTUriRuntimeClassFactory.CreateUri(String uri)
   at ABI.System.Uri.CreateMarshaler(Uri value)
   at Microsoft.Graphics.Canvas.Text.CanvasFontSet._ICanvasFontSetFactory.Create(Uri uri)
   at Microsoft.Graphics.Canvas.Text.CanvasFontSet.<>c__DisplayClass11_0.<.ctor>b__0()
   at Microsoft.Graphics.Canvas.Text.CanvasFontSet..ctor(Uri uri)
   at Microsoft.Maui.FontManager.FindFontFamilyName(String fontFile)
Microsoft.Maui.FontManager: Error: Error loading font 'Assets/Fonts/Roboto.otf'.


System.ArgumentException: The parameter is incorrect.


Assets/Fonts/Roboto.otf is not a valid absolute URI.
   at WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|39_0(Int32 hr)
   at ABI.System.WinRTUriRuntimeClassFactory.CreateUri(String uri)
   at ABI.System.Uri.CreateMarshaler(Uri value)
   at Microsoft.Graphics.Canvas.Text.CanvasFontSet._ICanvasFontSetFactory.Create(Uri uri)
   at Microsoft.Graphics.Canvas.Text.CanvasFontSet.<>c__DisplayClass11_0.<.ctor>b__0()
   at Microsoft.Graphics.Canvas.Text.CanvasFontSet..ctor(Uri uri)
   at Microsoft.Maui.FontManager.FindFontFamilyName(String fontFile)

1 Reply

SY Suthi Yuvaraj Syncfusion Team February 23, 2024 12:01 PM UTC

Hi Ismail Hassani,

We have checked your query, we would like to let you know that we didnot used any font files in our source. If you have implemented any custom fonts in your sample, it is necessary to incorporate the corresponding font files into your resources to prevent any issues with file stability. Please confirm whether you are incorporating any font files at the sample level. If you are not, we would appreciate it if you could provide us with the code snippet related to the SfListView settings, font customization, item template, or any other relevant details. This will enable us to replicate the issue on our end and work towards a timely resolution.

Regards,

Suthi Yuvaraj


Loader.
Up arrow icon