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

Pod更新后Firebase编译报错:GULURLSessionDataResponse.h文件未找到

解决GoogleUtilities头文件找不到的编译错误

针对Pod更新后出现的'GoogleUtilities/Environment/Public/GoogleUtilities/GULURLSessionDataResponse.h' file not found错误,可按以下步骤排查修复:

  • 彻底清理并重新安装Pods
    执行以下命令:

    rm -rf Podfile.lock
    rm -rf Pods
    pod deintegrate
    pod repo update
    pod install
    
  • 指定iOS平台最低版本
    打开Podfile中注释的平台配置行,将版本调整为符合Firebase和MLKit要求的最低版本(目前建议至少iOS 11.0):

    platform :ios, '11.0'
    
  • 修复Xcode项目配置
    检查项目的Build Settings,确保Header Search Paths中包含$(inherited),并且路径配置正确。若仍有问题,可手动添加${PODS_ROOT}/GoogleUtilities/Environment/Public到Header Search Paths中(设置为递归Recursive)。

  • 清理Xcode缓存
    按下Command+Shift+K清理当前项目构建缓存,再按下Command+Option+Shift+K清理Xcode派生数据,之后重新编译项目。

  • 排查依赖版本冲突
    若上述步骤无效,可尝试指定Firebase的具体稳定版本,避免自动更新到可能存在兼容性问题的最新版本。例如在Podfile中修改:

    pod 'Firebase', '~> 10.0.0'
    pod 'Firebase/Core', '~> 10.0.0'
    # 其他Firebase组件同理指定对应版本
    

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.19 17:38:18