无法构建模块Firebase [英] Could not build module Firebase

查看:341
本文介绍了无法构建模块Firebase的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试将Firebase分析连接到Objective C / Swift项目中。我已经按照说明正确。我的搜索路径已设置。我的链接器标志设置为-ObjC。我可以让项目正确编译。一旦我@import Firebase和构建,我得到一个错误,说不能构建Firebase模块。当我查看日志时,发现构建Firebase分析和Firebase Core存在解析问题。我已经把这个连接到另外三个项目中,没有使用可可豆荚。请指教。

解决方案

我已经遇到了这个问题,并尝试了一切可能:

   - (检查实际使用的是.xcworkspace而不是.xcproj)
- 删除派生数据
- 清理的Pods文件夹,已删除的Podfile.lock,pod再次崩溃并重新安装/更新
- 删除我的mac上的缓存文件(包括Library / Caches / Cocoapods中的隐藏文件夹),/ var /文件夹等。
- 删除了项目,卸载Xcode,重新安装,再次克隆等。
- 检查Xcode的所有生成设置,拼命尝试所有选项

没有任何工作。

唯一的解决方案(和正确的)是运行一个 sudo gem install cocoa pods 1.2.0 1.2.1

确实,你可以看到在1.2.1的更新日志中有这个拉取请求修复了供应商框架的导入问题


$ b

TL; DR 运行cocoapods 1.2.0,你需要运行 sudo gem install cocoa pods 并确保至少运行了1.2.1。



您可以通过在终端的任何位置输入 pod --version 来检查您的版本。



我希望这有助于。


I have been trying to wire up Firebase analytics into a Objective C/Swift project. I have followed the instructions properly. My search paths are set. My linker flags is set to -ObjC. I can get the project to compile properly. As soon a I @import Firebase and build, I get an error that says cannot build Firebase module. When I look into the logs I see there is a parse issue building Firebase analytics and Firebase Core. I have wired this into three other projects fine not using cocoa pods. Please advise.

解决方案

I have faced this issue and tried everything possible :

- (Checked that I was actually using .xcworkspace instead of .xcproj)
- Deleted Derived Data
- Cleaned Pods folder, deleted Podfile.lock, pod deintegrate and pod install / update again
- Deleted cached file everywhere on my mac (including hidden folders in Library/Caches/Cocoapods), /var/folders etc.
- Deleted the project, uninstalled Xcode, reinstalled, cloned again etc.
- Check all Build Settings in Xcode, desperately tried all options

Nothing worked.

The only solution (and the correct one) was to run a sudo gem install cocoa podsto go from 1.2.0to 1.2.1.

Indeed, you can see that in the changelog for 1.2.1 there is this pull request that fixes import issues with vendor frameworks

TL;DR If you are running cocoapods 1.2.0, you will want to run sudo gem install cocoa podsand make sure you are at least running 1.2.1.

You can check your version by typing pod --versionanywhere on your terminal.

I hope this helps.

这篇关于无法构建模块Firebase的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆