<unknown>:0: 错误:意外的输入文件: [英] <unknown>:0: error: unexpected input file:

查看:29
本文介绍了<unknown>:0: 错误:意外的输入文件:的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从单独的 Stack OverFlow 帖子中下载了文件,并将文件夹拖到我的项目中(作为一个组).依赖关系得到解决,并且依赖文件的代码没有显示错误,但是当我尝试编译时我得到这个错误:

I downloaded files from a separate Stack OverFlow post, and dragged the folder into my project (as a group.) The dependancies get resolved and it shows no error for code that relies on the files, but when I try to compile I get this error:

<unknown>:0: error: unexpected input file: /.../xyz.Swift
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1

它可能什么都没有,但尽管在属性检查器中作为 swift 文件签入,但项目导航器中的文件本身显示为空白图标(而我的项目的另一个文件具有 swift 红色 spalsh 图标).

It might be nothing, but the files themselves in the project navigator show up as blank icons (while my project's other file have the swift red spalsh icon) despite checking in as swift files in the attribute inspector.

我在添加和删除多组文件时摸索了几次,我检查了本地目录,但似乎没有任何问题……还有其他事情可能会搞砸吗?

I've fumbled a few times with adding and deleting multiple sets of files, I checked the local dir and nothing seem out of order... is there something else that might be messing this up?

感谢您的建议!

推荐答案

已解决 - 问题与文件扩展名有关:

Solved - The issue was with the filename extension:

xyz .Swift 将无法正确链接.它将由 xcode 处理并解决预期的代码问题,但链接器会打嗝.

xyz .Swift will not properly link. It will be processed by xcode and solve code issues expecting it, but the linker will hiccup.

将文件重命名为 xyz .swift -> 问题已解决.

renamed files to xyz .swift -> problem solved.

这篇关于&lt;unknown&gt;:0: 错误:意外的输入文件:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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