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

升级Flutter 3.1后iOS端pod install报Flutter兼容版本错误

问题现象

升级至Flutter 3.1版本后,项目Android端可正常构建、运行,但iOS端执行pod install安装依赖时报错,执行flutter doctor检测未发现开发环境异常。

报错日志

pod install执行过程的终端输出如下:

Aungs-MBP:ios aungmyooo$ pod install
Analyzing dependencies
firebase_analytics: Using Firebase SDK version '8.15.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '8.15.0' defined in 'firebase_core'
Warning: firebase_app_id_file.json file does not exist. This may cause issues in upload-symbols. If this error is unexpected, try running flutterfire configure again.
firebase_crashlytics: Using Firebase SDK version '8.15.0' defined in 'firebase_core'
firebase_messaging: Using Firebase SDK version '8.15.0' defined in 'firebase_core'
[!] CocoaPods could not find compatible versions for pod "Flutter":
  In Podfile:
    Flutter (from `Flutter`)

Specs satisfying the `Flutter (from `Flutter`)` dependency were found, but they required a higher minimum deployment target.
现有环境信息
  • Flutter运行于master渠道,版本为3.1.0-0.0.pre.1279,宿主系统为macOS 12.4 21F79 darwin-x64,配套Dart版本2.18.0、DevTools版本2.14.0
  • Android工具链版本31.0.0,Xcode版本13.4.1,CocoaPods版本1.11.3,Android Studio、VS Code、Chrome、已连接设备、HTTP连通性检测均正常
报错产生原因

核心原因是CocoaPods依赖校验时的最低部署目标不匹配:

  • 当前使用的3.1.0-0.0.pre.1279属于Flutter master渠道的预发布版本,该版本已正式将iOS端最低支持的系统版本从原有的iOS 9.0提升至iOS 11.0
  • 项目iOS目录下Podfile文件中配置的全局最低iOS部署版本低于Flutter 3.1要求的最低阈值,CocoaPods拉取本地Flutter依赖时判定版本规则不满足,直接抛出兼容错误
  • 日志中提示的firebase_app_id_file.json文件缺失为非阻断性警告,仅会影响后续符号表上传流程,不会中断pod install执行,和本次核心报错无关联。

内容的提问来源于stack exchange,提问作者Alex Aung

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.08.30 09:24:22