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

升级Flutter 2.5.0后iOS模拟器运行报Pods_Runner.framework缺失arm64架构

Flutter 2.5.0 iOS模拟器arm64架构缺失报错解决方案

该问题多发于搭载Apple Silicon(M系列)芯片的Mac设备,属于Flutter 2.5.0版本的已知适配问题:通过Android Studio/命令行调用Xcode编译时,会出现模拟器架构识别异常,但Xcode直接编译、实体设备编译不受影响。

可按照以下步骤修复:

  • 修改iOS项目根目录下的Podfile,在post_install代码块中添加模拟器架构排除规则,最终配置参考如下:
post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64'
    end
  end
end
  • 打开Xcode加载项目中的Runner.xcworkspace,进入Runner目标的「Build Settings」页,找到「Excluded Architectures」配置项,为Debug模式的iphonesimulator SDK添加arm64值,和Pods项目的配置保持统一。
  • 执行以下命令清理旧构建缓存并重新安装依赖:
    1. 项目根目录执行flutter clean
    2. 删除ios/Pods文件夹、ios/Podfile.lock文件
    3. 项目根目录执行flutter pub get
    4. 进入ios目录执行pod install

操作完成后重新运行项目即可解决。如果偶现依旧报错的情况,先通过Xcode运行一次模拟器构建,再回到Android Studio/命令行执行运行操作即可恢复。

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.10.04 11:45:03