FFImageLoading icon indicating copy to clipboard operation
FFImageLoading copied to clipboard

Android 11 SVG rendering blank

Open vtkachen111 opened this issue 4 years ago β€’ 22 comments

πŸ› Bug Report

I updated my Samsung s10+ to android 11 and in my app all the svgs stopped rendering

Expected behavior

Reproduction steps

Configuration

Version: 1.x

Platform:

  • [ ] :iphone: iOS
  • [X ] :robot: Android
  • [ ] :checkered_flag: WPF
  • [ ] :earth_americas: UWP
  • [ ] :apple: MacOS
  • [ ] :tv: tvOS
  • [ ] :monkey: Xamarin.Forms

vtkachen111 avatar Feb 02 '21 16:02 vtkachen111

same issue

sarkarstanmoy avatar Feb 04 '21 19:02 sarkarstanmoy

I have reports of the same issue in my App. However, it appears that only images that are not within the main Apps assembly that are not loading. Most of my assets are another binary. It appears those are not displaying; but, my local ones are. I'm still trying to confirm. So far it's only be reported on Samsung S10, S10+ and S20 that are running Android 11. I have none of these devices to test with. I will update the case when I have confirmed this observation.

jaredballen avatar Feb 04 '21 21:02 jaredballen

Workaround that fixed this for me... install skiasharp on your android project

vtkachen111 avatar Feb 04 '21 21:02 vtkachen111

Interesting. I already include SkiaSharp (v2.80.2) and SkiaSharp.Forms (v2.80.2) in my Android project and I am having this issue.

jaredballen avatar Feb 04 '21 21:02 jaredballen

Forget my last comment. @vtkachen111 it looks like your workaround worked for me as well. Upon closer inspection I needed to consolidate the SkiaSharp versions in my Android project. Now that they are all at the same level, I've been able to have someone confirm the images are now showing on an S10.

jaredballen avatar Feb 04 '21 22:02 jaredballen

Yeah lol, freaked me out a little bit when my phone updated to android 11 and opening my app didn't show any buttons i've made out of svgs. I don't think this library is maintained much anymore... hopefully it'll re-appear as part of community toolkit or xamarin essentials

vtkachen111 avatar Feb 04 '21 22:02 vtkachen111

Worked for me also . Thanks

sarkarstanmoy avatar Feb 05 '21 05:02 sarkarstanmoy

for android 11 Call Init() Static Method in SvgCachedImage Class before using new object from SvgCachedImage()

Like that FFImageLoading.Svg.Forms.SvgCachedImage.Init(); var svgCachedImage = new FFImageLoading.Svg.Forms.SvgCachedImage { ReplaceStringMap = xxxxxxxxxxx , Source = "xxxxxxxxxxx" };

progkhalifa avatar Jun 02 '21 21:06 progkhalifa

Great, update SkiaSharp.Views.Forms package to v2.80.3 do the tricks Thanks a lot

WongWeiLoon avatar Jul 14 '21 07:07 WongWeiLoon

Hi guys, any update about this issue?, I've got the sameπŸ˜…

LuisiitoDev avatar Sep 03 '21 18:09 LuisiitoDev

We saw the blank SVG issue on a Samsung Galaxy S10 running Android 11.

Our app uses the Xamarin.FFImageLoading.Svg.Forms Nuget, which ultimately uses SkiaSharp. However, we did not explicitly include SkiaSharp in our Visual Studio project. Adding an explicit reference to the latest (2.80.3) version of SkiaSharp to our project's Nugets fixed the problem for us.

awalker-dsg avatar Sep 10 '21 12:09 awalker-dsg

Thank you very much! Simple adding SkiaSharp library helped to me!

kofanov avatar Oct 09 '21 07:10 kofanov

We saw the blank SVG issue on a Samsung Galaxy S10 running Android 11.

Our app uses the Xamarin.FFImageLoading.Svg.Forms Nuget, which ultimately uses SkiaSharp. However, we did not explicitly include SkiaSharp in our Visual Studio project. Adding an explicit reference to the latest (2.80.3) version of SkiaSharp to our project's Nugets fixed the problem for us.

Worked like a charm

alexmartinezm avatar Oct 15 '21 10:10 alexmartinezm

Still not fixed. No embedded svg shows up in android release.

BillyMartin1964 avatar Nov 27 '21 20:11 BillyMartin1964

We saw the blank SVG issue on a Samsung Galaxy S10 running Android 11.

Our app uses the Xamarin.FFImageLoading.Svg.Forms Nuget, which ultimately uses SkiaSharp. However, we did not explicitly include SkiaSharp in our Visual Studio project. Adding an explicit reference to the latest (2.80.3) version of SkiaSharp to our project's Nugets fixed the problem for us.

Still not fixed. No embedded SVG shows up in android 11.

Solution: Installs the NuGet package SkiaSharp version (2.80.3) or bigger. (I installed it in my Android project only and is working like a charm) .

MarioG108 avatar Jun 09 '22 14:06 MarioG108

We saw the blank SVG issue on a Samsung Galaxy S10 running Android 11. Our app uses the Xamarin.FFImageLoading.Svg.Forms Nuget, which ultimately uses SkiaSharp. However, we did not explicitly include SkiaSharp in our Visual Studio project. Adding an explicit reference to the latest (2.80.3) version of SkiaSharp to our project's Nugets fixed the problem for us.

Still not fixed. No embedded SVG shows up in android 11.

Solution: Installs the NuGet package SkiaSharp version (2.80.3) or bigger. (I installed it in my Android project only and is working like a charm).

Thanks so much, would it be possible to fix this through a PR? πŸ™‚

bricefriha avatar Jul 07 '22 10:07 bricefriha

Updating SkiaSharp to the latest version(2.88.0) fixed the issue for me

devperson avatar Aug 02 '22 20:08 devperson

Hello guys,

I have installed Skiasharp on my Xamarin Android project as you recommended but don't know what else to do? Do I need to substitute FFimageLoading with this Skiasharp or what? I'm losing users like crazy due to this.

I have this:

ImageService.Instance.LoadUrl(URLImage404) .Retry(3, 250) .LoadingPlaceholder("LoadingImage", FFImageLoading.Work.ImageSource.CompiledResource) .ErrorPlaceholder("LoadingImage", FFImageLoading.Work.ImageSource.CompiledResource) .Into(cardview.imgIcon);

Kenny-Ali avatar Aug 06 '22 05:08 Kenny-Ali

We saw the blank SVG issue on a Samsung Galaxy S10 running Android 11. Our app uses the Xamarin.FFImageLoading.Svg.Forms Nuget, which ultimately uses SkiaSharp. However, we did not explicitly include SkiaSharp in our Visual Studio project. Adding an explicit reference to the latest (2.80.3) version of SkiaSharp to our project's Nugets fixed the problem for us.

Still not fixed. No embedded SVG shows up in android 11.

Solution: Installs the NuGet package SkiaSharp version (2.80.3) or bigger. (I installed it in my Android project only and is working like a charm) .

Just need to install it? What code do you put after?

Kenny-Ali avatar Aug 06 '22 15:08 Kenny-Ali

Updating SkiaSharp to the latest version(2.88.0) fixed the issue for me

Just need to install it? What code do you put after? Were you using FFImageLoading as well?

Kenny-Ali avatar Aug 06 '22 15:08 Kenny-Ali

Forget my last comment. @vtkachen111 it looks like your workaround worked for me as well. Upon closer inspection I needed to consolidate the SkiaSharp versions in my Android project. Now that they are all at the same level, I've been able to have someone confirm the images are now showing on an S10.

Consolidate how?

Kenny-Ali avatar Aug 06 '22 18:08 Kenny-Ali

We saw the blank SVG issue on a Samsung Galaxy S10 running Android 11. Our app uses the Xamarin.FFImageLoading.Svg.Forms Nuget, which ultimately uses SkiaSharp. However, we did not explicitly include SkiaSharp in our Visual Studio project. Adding an explicit reference to the latest (2.80.3) version of SkiaSharp to our project's Nugets fixed the problem for us.

Still not fixed. No embedded SVG shows up in android 11.

Solution: Installs the NuGet package SkiaSharp version (2.80.3) or bigger. (I installed it in my Android project only and is working like a charm) .

Success.

marcoaurelyo avatar May 29 '23 22:05 marcoaurelyo