简体   繁体   中英

I am getting this error when build release in iOS Flutter

I am getting this error when building/archiving this project in 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. This might seem obvious for people experience with XCode, but maybe this will help someone sometime.

您似乎缺少库尝试:

  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
  2. Changed the IOS Deployment Target to a higher target iOS 11.2 . Earlier I had something like 8.0 which was giving all the above errors.
  3. Made sure that the IOS deployment targets in Xcode are same in the Project, Target and Pods

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM