链接器错误与FFImageLoading库

问题描述 投票:1回答:1

当我尝试使用FFImageLoading构建或调试应用程序时,我收到此错误:

1>D:\Programmi\visualstudio\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1696,5): error MSB4018: errore imprevisto dell'attività "LinkAssemblies".
1>D:\Programmi\visualstudio\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1696,5): error MSB4018: Mono.Linker.MarkException: Error processing method: 'System.Void FFImageLoading.Forms.Droid.CachedImageFastRenderer/ElevationHelper::SetElevation(Android.Views.View,Xamarin.Forms.VisualElement)' in assembly: 'FFImageLoading.Forms.Droid.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve System.Nullable`1<System.Single> Xamarin.Forms.PlatformConfiguration.AndroidSpecific.Elevation::GetElevation(Xamarin.Forms.IPlatformElementConfiguration`2<Xamarin.Forms.PlatformConfiguration.Android,Xamarin.Forms.VisualElement>)

我怎么解决这个问题?

android xamarin
1个回答
1
投票
  • 将目标框架设置为最新的框架
  • 将您的Xamarin.Forms版本更新为2.5
  • 从所有项目中删除所有binobj文件夹
  • 重建

如果您无法更新Xamarin.Forms,请使用旧版程序包:https://www.nuget.org/packages/Xamarin.FFImageLoading.Forms/2.2.25-pre-619-legac

© www.soinside.com 2019 - 2024. All rights reserved.