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

Flutter在Mac上无法构建iPhone 14模拟器应用,求助解决方法

解决Flutter模拟器构建失败(Could not build the application for the simulator)的方案
  • 检查Xcode与Flutter版本兼容性
    运行flutter doctor查看Xcode版本是否符合当前Flutter版本的要求,若版本不匹配,升级或降级Xcode到对应兼容版本(例如Flutter 3.16+建议搭配Xcode 15+)。

  • 重置iPhone 14模拟器
    打开Xcode,依次点击Window -> Devices and Simulators,选中iPhone 14模拟器,右键选择Erase All Content and Settings,重置完成后重启模拟器再尝试运行项目。

  • 统一iOS部署目标版本
    打开iOS目录下的Runner.xcworkspace,在项目设置中确认Deployment Target版本不低于Flutter要求的最低版本(通常建议iOS 12.0+),同时保证Podfile中的platform :ios, 'x.x'配置与项目设置完全一致。

  • 清理Xcode缓存
    删除Xcode的DerivedData目录,路径为~/Library/Developer/Xcode/DerivedData,删除后重启Xcode再重新构建项目。

  • 切换Flutter到稳定通道并更新
    运行flutter channel查看当前通道,若处于dev/beta通道,执行flutter channel stable切换到稳定通道,再运行flutter upgrade更新到最新稳定版。

  • 核对Firebase配置文件
    确认GoogleService-Info.plist已正确放置在iOS/Runner目录下,且文件中配置的Bundle ID与项目的Bundle ID完全一致,无拼写错误或多余空格。

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.08.03 11:50:32