【发布时间】: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