我正在使用 iOS 的 codemagic 构建我的 flutter 项目。 android 构建工作正常。 iOS 构建错误:
Xcode build done. 1520.2s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
[...]
error: Build input file cannot be found: '/Users/Downloads/GoogleService-Info.plist' (in target 'Runner' from project 'Runner')
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Encountered error while building for device.
Build failed :|
Failed to build for iOS
但是我的 ios/Runner 包含 GoogleService-Info.plist 文件。
我也尝试过创建环境变量来存储这个文件,但没有成功。
我被困在这一点上,所以非常感谢任何帮助!
最佳答案
解决了问题! 正如@Paul Beusterien 所提到的,构建系统期望文件位于/Users/Downloads/GoogleServices-Info.plist。
如何改变?
两种可能的解决方案:
- 如果你有 Xcode: 只需单击文件并使用文件检查器将路径的位置更改为“相对于项目”。
2.不使用Xcode: 进入您的 project.pbxproj 文件并查找 name="GoogleServices-Info.plist"path="..."并将该路径更改为“GoogleServices-Info.plist”,如果该文件位于您的 ios/Runner/中文件夹。
关于ios - 由于 Firebase GoogleService-Info.plist,Codemagic iOS 构建失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63639855/