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

Flutter iOS模拟器构建失败:FirebaseRemoteConfig部署目标不兼容

解决Flutter iOS编译错误:模块最低部署目标与编译版本不匹配

你遇到的问题是虽然Podfile里指定了iOS 13.0,但Xcode实际编译时仍使用iOS 12.0,导致依赖的FirebaseRemoteConfig模块(最低要求iOS 13.0)报错。可按以下步骤解决:

  • 检查Xcode项目部署目标

    1. 打开项目的ios文件夹,用Xcode打开Runner.xcworkspace
    2. 选中左侧的Runner项目,切换到General标签页,在Deployment Info区域确认iOS Deployment Target设置为13.0或更高版本
    3. 同时检查Pods项目下的FirebaseRemoteConfig目标,确保它的部署目标和你的项目一致
  • 清理缓存并重新安装依赖

    1. 在终端执行Flutter清理命令:flutter clean
    2. 进入ios目录:cd ios
    3. 删除旧的Pod缓存文件:rm -rf Podfile.lock Pods
    4. 重新安装Pods:pod install
    5. 回到项目根目录:cd ..
  • 统一Pod部署目标配置
    如果上述步骤无效,修改ios/Podfile,在post_install钩子中强制所有依赖的部署目标和项目一致:

    post_install do |installer|
      installer.pods_project.targets.each do |target|
        flutter_additional_ios_build_settings(target)
        # 统一设置所有依赖的最低iOS版本为13.0
        target.build_configurations.each do |config|
          config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
        end
      end
    end
    

    修改后重新执行pod install

  • 重启工具并重新运行
    关闭Xcode和模拟器,重新打开项目,执行flutter run启动应用

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.16 10:32:32