微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Xcode 8.2,Swift编译器错误:错误:意外的输入文件

Xcode 8.1更新到8.2后,我在项目中面临 Swift编译器错误.我使用最新的Swift版本和Carthage进行依赖管理.它与Xcode 8.1完美搭配,现在我已经尝试了几个小时来修复它,方法是清理DerivedData和Simulator数据,在Xcode中清理并删除Build文件夹,但似乎没有任何帮助.我只安装了一个Xcode版本.

我得到以下编译错误

CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
cd <ProjectSource>
export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhonesimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhonesimulator.platform/Developer/SDKs/iPhonesimulator10.2.sdk
export TOOLCHAINS=com.apple.dt.toolchain.XcodeDefault

-- all files to compile --

unkNown>:0: error: unexpected input file: /Applications/Xcode.app/Contents/Developer/Platforms/iPhonesimulator.platform/Developer/SDKs/iPhonesimulator10.2.sdk
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc Failed with exit code

它所指的文件夹如下所示:

它实际上在那里,所以我不知道发生了什么……
非常感谢帮助!

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐