[英]How to solve this problem Module 'image_picker' not found on Xcode?
I know that is old topic, but i have a propossiton how you can resolve this issue.我知道这是个老话题,但我有一个建议,你可以如何解决这个问题。
If application is develope in Flutter, and this error occured when you opened project in XCode then you try open entire folder "ios" instead of "xcodeproj" or "xcworkspace".如果应用程序是在 Flutter 中开发的,并且当您在 XCode 中打开项目时发生此错误,那么您尝试打开整个文件夹“ios”而不是“xcodeproj”或“xcworkspace”。
The tip in the picture below.提示如下图。
Verify info.plist
验证
info.plist
iOS # Add the following keys to your Info.plist
file, located in <project root>/ios/Runner/Info.plist
: iOS # 将以下键添加到位于
<project root>/ios/Runner/Info.plist
Info.plist
文件中:
NSPhotoLibraryUsageDescription
- describe why your app needs permission for the photo library. NSPhotoLibraryUsageDescription
- 描述为什么你的应用需要照片库的权限。 This is called Privacy - Photo Library Usage Description in the visual editor.这在可视化编辑器中称为隐私 - 照片库使用说明。
NSCameraUsageDescription
- describe why your app needs access to the camera. NSCameraUsageDescription
- 描述为什么你的应用需要访问相机。 This is called Privacy - Camera Usage Description in the visual editor.这在可视化编辑器中称为隐私 - 相机使用说明。
NSMicrophoneUsageDescription
- describe why your app needs access to the microphone, if you intend to record videos. NSMicrophoneUsageDescription
- 如果您打算录制视频,请描述为什么您的应用需要访问麦克风。 This is called Privacy - Microphone Usage Description in the visual editor这在可视化编辑器中称为隐私 - 麦克风使用说明
More detail in: https://pub.dev/packages/image_picker更多详细信息: https : //pub.dev/packages/image_picker
First of all, you can try running the following commands:首先,您可以尝试运行以下命令:
pods repo update
rm -rf ios/Pods ios/Podfile.lock
flutter clean
flutter run
After that, you have to open the "Runner.xcworkspace" on Xcode.之后,您必须在 Xcode 上打开“Runner.xcworkspace”。
I know is an old topic but could help other people.我知道这是一个老话题,但可以帮助其他人。 You need to change "image_picker" to "image_picker_ios" and if this doesn't help, you can try this https://stackoverflow.com/a/72515674/11972105
您需要将“image_picker”更改为“image_picker_ios”,如果这没有帮助,您可以试试这个https://stackoverflow.com/a/72515674/11972105
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.