Xamarin.android ffimageloading.cross.MvxCachedImageView从Android上的资源加载svg

Xamarin.android ffimageloading.cross.MvxCachedImageView从Android上的资源加载svg,xamarin.android,ffimageloading,Xamarin.android,Ffimageloading,我正在尝试使用以下axml加载资源中的svg(设置为Embedded resource VS2019): <ffimageloading.cross.MvxCachedImageView android:layout_width="36dp" android:layout_height="36dp" local:MvxBind="ImagePath res:svg.passenger" /> 但什么都没有表现出来。它占用36x36空间,但无法加载svg

我正在尝试使用以下axml加载资源中的svg(设置为Embedded resource VS2019):

<ffimageloading.cross.MvxCachedImageView
    android:layout_width="36dp"
    android:layout_height="36dp"
    local:MvxBind="ImagePath res:svg.passenger" />

但什么都没有表现出来。它占用36x36空间,但无法加载svg

在调试输出中,它显示:

2019-09-12 13:38:13查看期间引发[错误](MvxBind)异常 绑定MvxException:意外字符:位于中的位置3 targetProperty text res:svg.passenger at MvvmCross.Binding.Parse.PropertyPath.MvxPropertyPathParser.ParseNextToken ()[0x00036]英寸 C:\projects\mvvmcross\mvvmcross\Binding\Parse\PropertyPath\MvxPropertyPathParser.cs:70 在MvvmCross.Binding.Parse.PropertyPath.MVXPropertyPath.Parse (System.String textToParse)[0x00009]英寸 C:\projects\mvvmcross\mvvmcross\Binding\Parse\PropertyPath\MvxPropertyPathParser.cs:39 09-12 13:38:13.606i/mono标准输出(18939):2019-09-12 13:38:13[错误] (MvxBind)视图绑定MvxException期间引发的异常: 意外字符:在targetProperty文本的位置3处 res:svg.passenger

我也试过:

<ffimageloading.cross.MvxCachedImageView
    android:layout_width="36dp"
    android:layout_height="36dp"
    local:MvxBind="ImagePath res://svg.passenger" />

<ffimageloading.cross.MvxCachedImageView
    android:layout_width="36dp"
    android:layout_height="36dp"
    ImagePath="res:svg.passenger" />


我很确定svg没有损坏,因为如果我使用XamSvg,它会正常显示

<XamSvg.SvgImageView
    local:svg="res:svg.passenger"
    local:colorMapping="4C7BC1=AAAAAA"
    android:layout_width="36dp"
    android:layout_height="36dp" />

更新:

<ffimageloading.cross.MvxCachedImageView
       android:gravity="right"
       android:layout_width="36dp"
       android:layout_height="36dp"
       local:MvxBind="ImagePath 'res:passenger.svg'" />

现在导致另一个异常:

09-12 14:42:56.806 D/skia(23916):---无法创建映像 消息为“未实现”的解码器图像加载失败: passenger.svg System.BadImageFormatException:不是位于的有效位图 FFImageLoading.PlatformImageLoaderTask
1[TImageView].GenerateImageFromDecoderContainerAsync
(FFImageLoading.IDecodedImage
1[TNativeImageContainer]已解码, FFImageLoading.Work.ImageInformation ImageInformation,System.Boolean iPlaceHolder)[0x000ba]英寸 C:\projects\ffimageloading\source\ffimageloading.Droid\Work\PlatformImageLoadingTask.cs:221 09-12 14:42:56.810 D/skia(23916):---无法创建映像 带有消息“未实现”的解码器09-12 14:42:56.849 I/mono标准输出(23916):图像加载失败:passenger.svg 09-12 14:42:56.850 I/mono标准输出(23916):System.BadImageFormatException:非 位于的有效位图 FFImageLoading.Work.ImageLoaderTask
3[TDecoderContainer,TImageContainer,TImageView].GenerateImageAsync
(System.String路径,FFImageLoading.Work.ImageSource源,
System.IO.Stream imageData,FFImageLoading.Work.ImageInformation
imageInformation,System.Boolean启用转换,System.Boolean
iPlaceHolder)[0x002e2]英寸
C:\projects\ffimageloading\source\ffimageloading.Common\Work\ImageLoaderTask.cs:360
在
FFImageLoading.Work.ImageLoaderTask
3[TDecoderContainer,TImageContainer,TImageView].RunAsync ()[0x0047c]英寸 C:\projects\fImageLoading\source\fImageLoading.Common\Work\ImageLoaderTask.cs:643


啊。。。好。。这令人尴尬:

FFImageLoading.Cross.MvxCachedImageView

这不是你想要的景色

FFImageLoading.Cross.MvxSvgCachedImageView

尽管如此:)

对于任何其他人来说,一个真实的例子如下所示:

<FFImageLoading.Cross.MvxSvgCachedImageView
    android:id="@+id/iconJob"
    android:layout_width="100dp"
    android:layout_height="100dp"
    android:layout_marginBottom="10dp"
    local:MvxBind="Click NavigateJobCommand; ImagePath 'resource://Throwaway1.ResourceLibraryWithAllSvgs.svg.taxi.svg?assembly=Throwaway1.ResourceLibraryWithAllSvgs'" />

我认为缓存图像不支持svg,您可能想查看一下
<FFImageLoading.Cross.MvxSvgCachedImageView
    android:id="@+id/iconJob"
    android:layout_width="100dp"
    android:layout_height="100dp"
    android:layout_marginBottom="10dp"
    local:MvxBind="Click NavigateJobCommand; ImagePath 'resource://Throwaway1.ResourceLibraryWithAllSvgs.svg.taxi.svg?assembly=Throwaway1.ResourceLibraryWithAllSvgs'" />