flutter iOS构建错误 - 未找到框架image_picker

发布于 2025-01-20 02:43:43 字数 541 浏览 4 评论 0原文

我添加了 image_picker 我的项目中的库。

我已经尝试按照以下内容解决问题:

Deleted podfile.lock & Pods folder from iOS Directory
Deleted pubspec.lock file from Project Directory
pod deintegrate
flutter clean
flutter pub get
pod install

在iOS中构建项目时,它会在错误之后引发

ld: framework not found image_picker
clang: error: linker command failed with exit code 1 (use -v to see invocation)

任何人可以为此提供解决方案吗?

I have added v0.8.5 of image_picker library in my project.

I have tried following things to solve the issue:

Deleted podfile.lock & Pods folder from iOS Directory
Deleted pubspec.lock file from Project Directory
pod deintegrate
flutter clean
flutter pub get
pod install

While building the project in iOS,It throws following error

ld: framework not found image_picker
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Can anyone provide a solution to this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

半透明的墙 2025-01-27 02:43:44

对我来说更改为 image_picker: 0.8.0
之后,

  1. flutter clean,
  2. flutter pub get
  3. cd ios
  4. pod deintegrate;吊舱安装

for me change to image_picker: 0.8.0
after that,

  1. flutter clean,
  2. flutter pub get
  3. cd ios
  4. pod deintegrate; pod install
雨落星ぅ辰 2025-01-27 02:43:44

由于最新更新,其中包括将Image_picker迁移到Android和iOS联合软件包,因此iOS软件包的命名约定已从“ Image_picker” 转换为 “ Image_picker_ios”

解决方案:

只需确保在XCode中,您的应用程序的项目和目标链接器标志从“ Image_picker” 设置为“ image_picker_ios”

  1. 导航到Xcode项目,然后构建设置
  2. 查找部分链接,然后其他链接标志
  3. 更改标志 -framework“ image_picker” to -framework“ image_picker_ios”

很重要:必须将更改应用于项目和目标链接器标志。

Due to the latest update, which includes migration of image_picker to Android and iOS federation packages, the naming convention of the iOS package has changed from "image_picker" to "image_picker_ios".

Solution:

Just make sure that in xcode, your app's project and target linker flags are set from "image_picker" to "image_picker_ios".

  1. Navigate to xcode project, and then build settings
  2. Find section Linking and then Other linking flags.
  3. Change flag -framework "image_picker" to -framework "image_picker_ios"

Important: changes must be applied to both project and target linker flags.

〆凄凉。 2025-01-27 02:43:44

打开 runner.xcodeproj/project.pbxproj 和更改 image_picker to image_picker_ios_ios 在所有地方。

Open Runner.xcodeproj/project.pbxproj and change image_picker to image_picker_ios in all places.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文