简体   繁体   English

在 iOS Flutter 中构建版本时出现此错误

[英]I am getting this error when build release in iOS Flutter

I am getting this error when building/archiving this project in Xcode.在 Xcode 中构建/归档此项目时出现此错误。 (Flutter) (扑)

ld: warning: directory not found for option '-L/Users/gurleensethi/FlutterProjects/camera_ml/build/ios/Debug-iphoneos/FirebaseCore'
ld: warning: directory not found for option '-L/Users/gurleensethi/FlutterProjects/camera_ml/build/ios/Debug-iphoneos/GTMSessionFetcher'
ld: warning: directory not found for option '-L/Users/gurleensethi/FlutterProjects/camera_ml/build/ios/Debug-iphoneos/GoogleAPIClientForREST'
ld: warning: directory not found for option '-L/Users/gurleensethi/FlutterProjects/camera_ml/build/ios/Debug-iphoneos/GoogleToolboxForMac'
ld: warning: directory not found for option '-L/Users/gurleensethi/FlutterProjects/camera_ml/build/ios/Debug-iphoneos/Protobuf'
ld: warning: directory not found for option '-L/Users/gurleensethi/FlutterProjects/camera_ml/build/ios/Debug-iphoneos/firebase_ml_vision'
ld: warning: directory not found for option '-L/Users/gurleensethi/FlutterProjects/camera_ml/build/ios/Debug-iphoneos/flutter_native_image'
ld: warning: directory not found for option '-L/Users/gurleensethi/FlutterProjects/camera_ml/build/ios/Debug-iphoneos/image_picker'
ld: warning: directory not found for option '-L/Users/gurleensethi/FlutterProjects/camera_ml/build/ios/Debug-iphoneos/nanopb'
ld: warning: directory not found for option '-L/Users/gurleensethi/FlutterProjects/camera_ml/build/ios/Debug-iphoneos/path_provider'
ld: library not found for -lFirebaseCore
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I was having similar issues, and for me the problem was caused by opening Runner.xcodeproj instead of Runner.xcodeworkspace in XCode.我遇到了类似的问题,对我来说,问题是由于在 XCode 中打开 Runner.xcodeproj 而不是 Runner.xcodeworkspace 引起的。 This might seem obvious for people experience with XCode, but maybe this will help someone sometime.对于使用 XCode 的人来说,这似乎很明显,但也许这会在某个时候对某人有所帮助。

您似乎缺少库尝试:

  1. flutter clean
  2. flutter build ios

I spent hours trying to fix a similar bug on library not found.我花了几个小时试图修复未找到的库上的类似错误。 Ultimately this is how I was able to resolve it最终这就是我能够解决它的方式

  1. Before starting with Xcode Archive, used flutter build iOS在开始使用 Xcode Archive 之前,使用 flutter build iOS
  2. Changed the IOS Deployment Target to a higher target iOS 11.2 .将 IOS 部署目标更改为更高的目标 iOS 11.2 。 Earlier I had something like 8.0 which was giving all the above errors.早些时候我有类似 8.0 的东西,它给出了上述所有错误。
  3. Made sure that the IOS deployment targets in Xcode are same in the Project, Target and Pods确保 Xcode 中的 IOS 部署目标在 Project、Target 和 Pods 中相同

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么我在构建 IOS flutter 应用程序时出现应用程序图标错误? - Why I am getting app icon error while build IOS flutter app? 当我在 ios 模拟器上运行我的 flutter 项目时出现此错误:-ProcessException:进程超时: - I am getting this error when i run my flutter project on ios simulator:-ProcessException: Process timed out: 为 iOS 运行 flutter 项目时出现错误 - I am getting error while running the flutter project for iOS 当我构建 iOS 一个颤振项目时,它显示一个错误 - When I build iOS a flutter project it shows an error 为什么我在为 Flutter 构建 codemagic 代码时出现“无法为 iOS 构建”? - Why am I getting “Failed to build for iOS” while building code in codemagic for Flutter? 当 iOS 在 Flutter 中构建时,如何解决此错误 - How can I Solve this error when iOS build in Flutter 在 Flutter 中的 `ios` 模拟器上运行我的 flutter 项目时遇到错误(vs 代码) - I am experiencing an error when running my flutter project on `ios` simulator In Flutter (vs code) 尝试构建项目时出现以下错误 - I am getting the following error when i am trying t o build my project 我正在运行 flutter 应用程序并收到此错误 - I am running flutter app and getting this error Flutter ios 发布构建失败,退出代码为 1 - Flutter ios release build failed with exit code 1
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM