【问题标题】:Carthage + Quick framework + Swift 2 = "error: module file was created by an older version of the compiler; rebuild 'Quick' and try again"Carthage + Quick framework + Swift 2 =“错误:模块文件是由旧版本的编译器创建的;重建'Quick'并重试”
【发布时间】:2015-11-09 14:59:03
【问题描述】:

我在 Swift 2 中使用 Xcode 7 beta 5(它是当前唯一安装的 xcode),当我尝试使用 Quick 运行单元测试时,出现以下错误:

error: module file was created by an older version of the compiler; rebuild 'Quick' and try again

我正在使用 Carthage (0.8.0) 来管理我的依赖项。我的 Cartfile.private 有:

github "Quick/Quick" ~> 0.5.0
github "Quick/Nimble" "v2.0.0-rc.2"

据我所知,这些是这些库的 Swift 2 版本。我已经链接了库,当我尝试运行单元测试时,我得到了注意到的错误。

这里有一个类似的问题,但这似乎不是我的问题 Realm: Module was created by an older version of compiler and could not build objective-c module

我已经清理了我的 DerivedData 和 Carthage/Build 文件夹,但仍然没有运气。

如何使用 Swift 2 和 Quick 运行单元测试?

【问题讨论】:

    标签: swift unit-testing xcode7-beta5 carthage


    【解决方案1】:

    如果您是从其他 beta 版本更新,可能与以下问题有关:https://github.com/neonichu/xcode-install/issues/48

    xcode-install 使用同上安装 Xcode,它将源文件中的文件合并到目标路径的现有目录中。

    如果 Xcode 的新(测试版)版本不包含以前版本中存在的文件,则安装更新后旧文件仍然存在。

    尝试卸载并重新安装 Xcode。

    【讨论】:

      猜你喜欢
      • 2017-02-04
      • 2016-08-08
      • 2023-03-14
      • 1970-01-01
      • 1970-01-01
      • 2017-06-11
      • 1970-01-01
      • 2015-09-17
      • 1970-01-01
      相关资源
      最近更新 更多