【问题标题】:I am getting this error when build release in iOS Flutter在 iOS Flutter 中构建发布时出现此错误
【发布时间】:2018-08-13 13:43:08
【问题描述】:

在 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)

【问题讨论】:

    标签: ios dart flutter


    【解决方案1】:

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

    【讨论】:

      【解决方案2】:

      您似乎缺少库尝试:

      1. flutter clean
      2. flutter build ios

      【讨论】:

      • 做了几次,都没有成功!
      • 我认为这说明找不到构建文件夹尝试运行flutter build ios 然后尝试使用 xcode 运行
      • 它与firebase有关,但我无法弄清楚!
      【解决方案3】:

      我花了几个小时试图修复未找到的库上的类似错误。最终这就是我能够解决它的方法

      1. 在开始使用 Xcode Archive 之前,使用 Flutter 构建 iOS
      2. 将 IOS 部署目标更改为更高的目标 iOS 11.2。早些时候我有类似 8.0 的东西,它给出了上述所有错误。
      3. 确保 Xcode 中的 IOS 部署目标在 Project、Target 和 Pod 中相同

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2018-06-25
        • 2023-01-23
        • 1970-01-01
        • 2019-09-26
        • 2022-01-05
        • 2021-10-29
        • 2021-12-11
        相关资源
        最近更新 更多