模块文件由较旧版本的编译器创建 [英] Module file was created by an older version of the compiler

查看:277
本文介绍了模块文件由较旧版本的编译器创建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Carthage管理我的依赖项,一切都在模拟器中正常运行。

Using Carthage to manage my dependencies, everything runs fine in the simulator.

但是,在为设备构建时,我收到以下错误:

However, when building for a device I get the following error:

Module File was created by an older version of the compiler; rebuild Alamofire and try again: .../DerivedData/Build/Products/Debug-iPhones...

我尝试过其他人对类似问题的建议:删除我的派生数据,重新安装Carthage并重建框架。但是,错误一直存在。

I have tried what others suggested to similar issues: deleting my derived data, reinstalling Carthage and rebuilding the frameworks. However, the error has been persistent.

推荐答案

您使用的是正确版本的xcodebuild吗?你运行xcode-select -p时看到了什么?如果你想在Xcode 7中使用框架,应该指向Xcode 7。

Are you using the right version of xcodebuild? What do you see when you run xcode-select -p? It should be pointed at Xcode 7 if you want to use the frameworks in Xcode 7.

删除所有的派生数据 rm -rf~ / Library / Developer / Xcode / DerivedData /&& carthage build

另外,当你使用 carthage update 时没有 - no-use-binaries 选项然后下载预构建的框架,可以使用旧版本的xcodebuild构建。

Also, When you use carthage update without --no-use-binaries option then it downloads the pre built frameworks which may be built using the old version of xcodebuild.

替代方法是使用 carthage update --no-use-binaries 。这样,它将使用Mac上安装的最新Xcode版本编译所有框架。

Alternative way is to use carthage update --no-use-binaries. This way it will compile all the frameworks with the latest Xcode build installed on your Mac.

这篇关于模块文件由较旧版本的编译器创建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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