gpt4 book ai didi

xamarin.forms - Xamarin 表单 : Xamarin. Plugin.FilePicker 在 ios 上不起作用

转载 作者:行者123 更新时间:2023-12-04 09:45:24 26 4
gpt4 key购买 nike

我正在使用 Xamarin.Plugin.FilePicker从设备中选择一个文件。

以下是我从设备中选择文件的代码:

var file = await CrossFilePicker.Current.PickFile();
if (file != null)
{
filename_label.Text = file.FileName;
}

但这不适用于 ios 平台(在 android 和 windows 上工作正常)。在 ios 模拟器上运行时出现以下异常:

System.NotImplementedException has been thrown. This functionality is not implemented in the portable version of this assembly. You should reference the NuGet package from your main application project in order to reference the platform-specific implementation.



我在 ios 部分缺少什么?这是 package只适用于安卓和windows?

最佳答案

System.NotImplementedException has been thrown. This functionality is not implemented in the portable version of this assembly. You should reference the NuGet package from your main application project in order to reference the platform-specific implementation.



可能是 Xamarin.Forms 或 Mono SDK 版本与插件版本不匹配导致的错误。在您的情况下,插件的最新版本是 2.1.41 .这是7天前发布的。当您安装它时,它可能仍然是测试版。所以你可以卸载它并安装一个旧版本,比如 2.1.34 .

关于xamarin.forms - Xamarin 表单 : Xamarin. Plugin.FilePicker 在 ios 上不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62147735/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com