luberda-molinet / FFImageLoading

Image loading, caching & transforming library for Xamarin and Windows
MIT License
1.42k stars 377 forks source link

Tizen SVG Error - Could not load SkiaSharp #1405

Open gregatarcurve opened 4 years ago

gregatarcurve commented 4 years ago

🐛 Bug Report

The following exception is thrown when trying to load an SVG via SvgCachedImage in a Xamarin Forms Tizen .NET TV (6.0.0.14995) project. I've attached a sample project demonstrating this.

Could not load file or assembly 'SkiaSharp, Version=1.68.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756'. The located assembly's manifest definition does not match the assembly reference. (0x80131040)

Regular images (e.g. png) load fine using the CachedImage control.

SVGs work as expected in an Android project using the same code.

Expected behavior

The SVG should render.

Reproduction steps

TizenXamlApp1.zip

Configuration

Version:

2.4.11.982

Platform:

gregatarcurve commented 4 years ago

In the samples, I've seen there is a libSkiaSharp.so file in the root of the Tizen project folder. Is this somehow related?

EmilAlipiev commented 4 years ago

are you testing for the watch? i have reported similar issue here. https://github.com/Samsung/Tizen.NET/issues/49

myroot commented 4 years ago

@gregatarcurve I check attached project files. You have some mistake on your project.

  1. svg files was not included as embedded resource in assembly you need to add like below

    <ItemGroup>
    <EmbeddedResource Include="sample.svg" />
    </ItemGroup>
  2. file name and resource name is wrong resource://TizenXmlApp1.logo.svg resource://TizenXamlApp1.sample.svg

  3. We have issue on Tizen.NET.Sdk, it does not copy all .so files on packages you should add <CopyLocalRuntimeTargetAssets>true</CopyLocalRuntimeTargetAssets> this line on project file of TizenXamlApp1.TV project like below

    <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>tizen60</TargetFramework>
    <CopyLocalRuntimeTargetAssets>true</CopyLocalRuntimeTargetAssets>
    </PropertyGroup>

    it is a related issue link https://developer.tizen.org/forums/tizen-.net/2d-graphic-on-samsung-watch?langredirect=1

  4. It is a final reason, Tizen TV was not allow external shared library(.so) it may be blocked on TV sdk i'm not sure, allow or including skia library on tizen tv target

myroot commented 4 years ago

Anyway it is not issue of FFImageLoading.SVG. Please contact tizen related issue on here