首页 > 解决方案 > 在 iOS Flutter 中构建发布时出现此错误

问题描述

在 Xcode 中构建/归档此项目时出现此错误。(扑)

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)

标签: iosdartflutter

解决方案


我遇到了类似的问题,对我来说,问题是由在 XCode 中打开 Runner.xcodeproj 而不是 Runner.xcodeworkspace 引起的。对于使用 XCode 的人来说,这似乎很明显,但也许这会在某个时候对某人有所帮助。


推荐阅读