【问题标题】:Error while running flutter project on IOS device在 IOS 设备上运行颤振项目时出错
【发布时间】:2022-01-11 06:40:45
【问题描述】:

我一直试图在我的 MacBook Air 12.1 上运行我的颤振项目,但出现以下错误。

Error output from CocoaPods:
↳
    Searching for inspections failed: undefined method `map' for nil:NilClass

我曾尝试清理 pods 文件或删除 pods 文件并重新安装 pod,但从昨天开始遇到同样的问题。

以下是我正在使用的版本的颤振医生

[✓] Flutter (Channel stable, 2.8.1, on macOS 12.1 21C52 darwin-x64, locale
    en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
[✓] Android Studio (version 2020.3)
[✓] Connected device (1 available)

如果我在 Xcode 上运行相同的项目,我会得到一个不同的错误,如下所示:

flutter/.pub-cache/hosted/pub.dartlang.org/share_plus-3.0.4/ios/Classes/FLTSharePlusPlugin.h: No such file or directory

【问题讨论】:

    标签: ios xcode flutter


    【解决方案1】:

    您可以在终端中运行此命令

    sudo arch -x86_64 gem install ffi

    并在重新安装依赖项后

    arch -x86_64 pod 安装

    【讨论】:

    • 运行第二个命令后出现同样的错误
    • 运行这个命令:-arch -x86_64 pod update
    • 显示同样的错误
    猜你喜欢
    • 2021-03-18
    • 2021-02-13
    • 1970-01-01
    • 2020-07-11
    • 2021-06-08
    • 2021-07-08
    • 1970-01-01
    • 1970-01-01
    • 2021-12-16
    相关资源
    最近更新 更多