【问题标题】:how to fix error: Abort trap 6 (in target 'RealmSwift' from project 'Pods')?如何修复错误:中止陷阱 6(在项目 \'Pods\' 的目标 \'RealmSwift\' 中)?
【发布时间】:2022-10-05 14:55:29
【问题描述】:

构建项目时,出现错误error: Abort trap: 6 (in target 'RealmSwift' from project 'Pods')

https://i.stack.imgur.com/l8Uog.png

我在 m1 pro 上使用 xcode 13.3,macbook

我在互联网上找到的提示没有帮助。

有谁知道我的问题的解决方案?

【问题讨论】:

标签: swift xcode


【解决方案1】:

要解决此问题,您需要将您拥有的 Realm 版本更新到 RealmSwift 10.25.0 或更高版本。

您可以更改 Podfile 文件

pod 'RealmSwift', '~> 10.25.0'

之后,您只需在项目文件夹中打开终端并执行以下操作:

pod repo update
pod install

【讨论】:

  • 我已将 Realm 更新为 10.28.1 ,然后就可以了
【解决方案2】:

Xcode更新后我遇到了同样的问题。 这个命令确实有帮助:

Pod 存储库更新

【讨论】:

    【解决方案3】:

    我找到了解决方案,希望它有用:)

    选择 Pods > Build Settings > Swift Compiler - Code Generation > Optimization Level > Debug and Release cmake "No Optimization [-Onone]"

    选择您的项目 > 选择目标 > 构建设置 > Swift 编译器 - 代码生成 > 优化级别 > 调试和实现使“无优化 [-Onone]”

    【讨论】:

      猜你喜欢
      • 2014-12-13
      • 2017-05-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-03-27
      • 2019-03-25
      相关资源
      最近更新 更多