You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

升级macOS Sequoia后Flutter集成Firebase遇'-G'选项不支持错误

问题:macOS Sequoia + Flutter + Firebase(gRPC) 编译报错:unsupported option '-G'

环境信息

  • M3芯片Apple MacBook Pro,系统已升级至macOS Sequoia(15.0 24A5264n)
  • Flutter 3.22.1稳定版,Xcode 16.0测试版(Build 16A5171c),CocoaPods 1.15.2

问题现象

全新空Flutter项目可正常运行,但添加依赖gRPC的Firebase后,编译出现如下错误:

  • iOS 17/18模拟器:unsupported option '-G' for target x86_64-apple-ios14.0-simulator
  • iOS真机:unsupported option '-G' for target 'arm64-apple-ios14.0'

Xcode中报错文件

-BoringSSL-GRPC
 |- tls_record.cc
 |- x_spki.c
 |- x_val.c
 |- x_val.c
 |- x_x509.c
 |- x_x509a.c

flutter doctor -v检测结果

[✓] Flutter (Channel stable, 3.22.1, on macOS 15.0 24A5264n darwin-arm64, locale
    en-US)
    • Flutter version 3.22.1 on channel stable at
      /Users/salarpro/development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision a14f74ff3a (3 weeks ago), 2024-05-22 11:08:21 -0500
    • Engine revision 55eae6864b
    • Dart version 3.4.1
    • DevTools version 2.34.3

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/salarpro/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Applications/Android
      Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      17.0.9+0-17.0.9b1087.7-11185874)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
    • Xcode at /Applications/Xcode-beta.app/Contents/Developer
    • Build 16A5171c
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build
      17.0.9+0-17.0.9b1087.7-11185874)

[✓] VS Code (version 1.90.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.90.0

[✓] Connected device (3 available)
    • macOS (desktop)                 • macos                 • darwin-arm64   •
      macOS 15.0 24A5264n darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin         •
      macOS 15.0 24A5264n darwin-arm64
    • Chrome (web)                    • chrome                • web-javascript •
      Google Chrome 125.0.6422.144

[✓] Network resources
    • All expected network resources are available.

内容的提问来源于stack exchange,提问作者Salar Pro

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.22 14:35:53