【问题标题】:impossible to build flutter on device or simulator in my mac无法在我的 Mac 上的设备或模拟器上构建颤振
【发布时间】:2020-10-23 07:33:21
【问题描述】:

两周后...我成功上传了 xcode 和 catalina OS 、zsh ...一切都可能很好但总是出错并且无法在我的物理设备或模拟器上启动我的应用程序。 Xcode 构建后总是出错。

有趣的事情,我从 pubspec.yaml 中删除了 App_review 包,但我总是出错...... 如果我启动颤振示例它可以工作,但是如果我使用以前工作过的某些包(如 admob)或应用程序审查,我会遇到此错误。我可以删除 app_review 包但删除 ad mob no...

编辑:我删除了所有显示错误但始终出现此错误的包 这是我的物理设备错误:

Xcode's output:
↳
   
    ld: framework not found FBLPromises
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    note: Using new build system
    note: Building targets in parallel

    note: Planning build
    note: Constructing build description

这是我使用模拟器时的错误:

Xcode's output:
↳
    ld: framework not found FBLPromises
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description
    warning: Mapping architecture armv7 to i386. Ensure that this target's Architectures and Valid Architectures build settings are configured correctly for the iOS Simulator platform. (in target 'in_app_purchase' from project 'Pods')
    warning: Mapping architecture arm64 to x86_64. Ensure that this target's Architectures and Valid Architectures build settings are configured correctly for the iOS Simulator platform. (in target 'in_app_purchase' from project 'Pods')
    warning: Mapping architecture arm64 to x86_64. Ensure that this target's Architectures and Valid Architectures build settings are configured correctly for the iOS Simulator platform. (in target 'Runner' from project 'Runner')
    warning: Mapping architecture armv7s to i386. Ensure that this target's Architectures and Valid Architectures build settings are configured correctly for the iOS Simulator platform. (in target 'Runner' from project 'Runner')
    warning: Mapping architecture armv7 to i386. Ensure that this target's Architectures and Valid Architectures build settings are configured correctly for the iOS Simulator platform. (in target 'Runner' from project 'Runner')

【问题讨论】:

  • 我遇到了类似的问题,我无法摆脱它。我搬到了 Flutter 的 beta 频道,下载了 SDK,然后又回到了 master。扑通一声后,它就像一个魅力
  • 很难从颤振日志中确定确切的问题。尝试通过 Xcode 运行应用程序,您将收到一条清晰而宝贵的错误消息。
  • Aawaz Gyawali 我已经删除了所有软件包,这些软件包消除了一些问题,但最后一个 => stackoverflow.com/questions/62742292/…
  • 试试这个,在 FLutter 的不同目录中使用相同的包创建一个新项目,并将所有 .dart 文件和 .yaml 复制到新项目中,然后尝试在 Xcode 中打开新项目并运行它,
  • 是的,目前当我用我的旧颤振文件创建一个新项目时它是有效的(没有 3 个产生问题的包(app_review/audioplayeur/ad_mob),但我可以没有它不是很重要)但我不明白我的项目哪里出了问题

标签: xcode flutter


【解决方案1】:

在 ios 文件夹中使用 xCode 打开 Runner.xcodeproj,选择“文件”菜单,然后选择“项目设置...”。在 Build System 中,选择 Legacy Build System 并再次运行。

【讨论】:

    【解决方案2】:

    我选择了旧版构建系统 ,现在我有最后一个错误

      === BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
        ld: framework not found FBLPromises
        clang: error: linker command failed with exit code 1 (use -v to see invocation)
    

    【讨论】:

    • 我尝试过,但我并不完全属于这种情况,我的 Xcode 是 11.5 并且构建相变,所以我有 flutter.firwmware 例如。我也用最新版本更改了我的颤振版本,但在使用包时遇到了一些问题。在flutter package get之后,我所有的包都变红了,就像没有加载......所以不可能构建xcode。
    【解决方案3】:

    请查看此线程并确保您没有意外覆盖 VALID_ARCHS 构建设置:What does warning "Mapping architecture arm64 to x86_64" mean?

    【讨论】:

    • 不工作我现在有警告:将架构 armv7 映射到 i386 ...
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-01-23
    • 1970-01-01
    • 1970-01-01
    • 2020-01-07
    • 2021-01-23
    • 2022-01-01
    相关资源
    最近更新 更多