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

使用Xcode Cloud构建Flutter iOS应用时找不到GoogleService-Info.plist

解决Xcode Cloud构建Flutter iOS应用时找不到GoogleService-Info.plist的问题

针对你遇到的Build input file cannot be found: '/Volumes/GoogleService-Info.plist'错误,结合本地构建正常、文件已提交git的情况,可按以下步骤排查修复:

  • 检查文件引用路径:打开ios/Runner.xcworkspace,选中GoogleService-Info.plist,查看右侧File Inspector的Location设置,确保是Relative to Runner,避免使用绝对路径(Xcode Cloud构建环境的绝对路径和本地不一致)。
  • 确认git跟踪状态:
    • 项目根目录执行git check-ignore ios/Runner/GoogleService-Info.plist,无输出说明文件未被.gitignore排除;若有输出,需移除.gitignore中对应规则。
    • 执行git ls-files ios/Runner/GoogleService-Info.plist,验证文件已被提交至仓库(避免本地添加但未提交的情况)。
  • 修正脚本路径引用:如果自定义构建脚本(Flutter pubspec或Xcode Build Phases中)涉及该文件,使用相对路径,比如用${SRCROOT}/GoogleService-Info.plist替代硬编码的绝对路径。
  • 清理Xcode Cloud缓存:在Apple Developer后台找到对应构建任务,点击“Clean Build”重新构建,清除旧缓存导致的异常。
  • 检查Target Membership:选中GoogleService-Info.plist,确认右侧Target Membership中Runner target已勾选,且添加文件时已勾选“Copy items if needed”,确保构建时文件会被复制到目标目录。

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.31 13:10:46