【问题标题】:File Folder error when using camera使用相机时文件夹错误
【发布时间】:2018-05-23 03:40:40
【问题描述】:

我已经按照docs 在 Xamarin 中实施拍照和挑选照片。我能够实现并挑选照片,但在使用用于打开相机拍照的函数 TakePhotoAsync() 时出现错误。我在谷歌上搜索可能的解决方案,但对我没有任何帮助。我没有修改任何权限或从当前添加用于挑选照片的权限。

它在这一行崩溃:

var file = await CrossMedia.Current.TakePhotoAsync(new Plugin.Media.Abstractions.StoreCameraMediaOptions
            {
                PhotoSize = Plugin.Media.Abstractions.PhotoSize.Medium
            });

我正在模拟器中测试:AVD_for_Galaxy_Nexus(Android 6.0 - API 23)

例外:

System.ArgumentException: Unable to get file location. This most likely means that the file provider information is not set in your Android Manifest file. Please check documentation on how to set this up in your project.

【问题讨论】:

    标签: xamarin.android android-camera android-fileprovider


    【解决方案1】:

    顺便说一句,我确实通过将插件版本从 Xam.Plugin.Media 3.1.3 降级到 Xam.Plugin.Media 3.1.2 解决了这个错误。我没有更改代码中的任何内容。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-07-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多