0

我最近切换到 Xcode 11.4 并使用 Swift 5。我运行 pod install、Realm 和 RealmSwift 安装最新版本。现在,当我运行该项目时,它向我显示了一个错误:

..../Pods/Realm/include/binding_context.hpp:24:10: 'realm/keys.hpp' 文件未找到

在此处输入图像描述

播客文件:

pod 'Realm', git: 'https://github.com/realm/realm-cocoa.git', branch: 'master', submodules: true
pod 'RealmSwift', git: 'https://github.com/realm/realm-cocoa.git', branch: 'master', submodules: true

领域框架版本:4.4.1

Cocoapod 版本:1.9.1

Xcode 版本:11.4

为什么会发生错误,我们如何才能摆脱它?

4

2 回答 2

0

为了解决这个问题,我不得不:

  1. pod 'RealmSwift'从我的 podfile中删除
  2. pod install
  3. 重新添加pod 'RealmSwift'到我的 podfile
  4. 再次运行pod install以获取最新版本。它解决了这个问题。
于 2020-08-12T12:09:14.693 回答
0

我通过更新我的豆荚摆脱了错误。pod update导航到项目文件夹后,我在终端中运行。

于 2021-06-15T12:52:50.827 回答