< unknown>:0:错误:打开模块"Swift"的导入文件:文件名太长 [英] <unknown>:0: error: opening import file for module 'Swift': File name too long

查看:61
本文介绍了< unknown>:0:错误:打开模块"Swift"的导入文件:文件名太长的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将我的XCode从6.4更新为XCode 7,现在出现此错误: :0:错误:打开模块"Swift"的导入文件:文件名太长

I updated my XCode from 6.4 to XCode 7 and now I get this error: :0: error: opening import file for module 'Swift': File name too long

现在我无法编译我的项目,没有人知道为什么会这样吗?它显示了我所有Swift文件的错误.

Now I'm unable to compile my project does anyone has an idea why is this happening? It shows this error for all my Swift Files.

推荐答案

所以我解决了这个问题.更新到Xcode7时的问题是Framework Search Paths值$(SRCROOT)设置为递归.由于某种原因,这在Xcode7中对我不起作用.我在Xcode6.4中将$(SRCROOT)设置为递归,在这里它工作得很好,但是在更新到Xcode7之后,它开始显示: :0:错误:打开模块"Swift"的导入文件:文件名太长 我删除了$(SRCROOT)值,并为应用程序中使用的每个库和框架添加了$(PROJECT_DIR)/...路径.我试图只将$(PROJECT_DIR)设置为递归值,但是会遇到相同的编译时错误,因此解决方案只是指定每个使用的库和框架的路径.

So I solve the problem. The issue when updated to Xcode7 was that the Framework Search Paths value $(SRCROOT) was set to recursive. For some reason this was not working for me in Xcode7. I have $(SRCROOT) set to recursive in Xcode6.4 where it was working perfectly fine but after the update to Xcode7 it start to show: :0: error: opening import file for module 'Swift': File name too long I deleted $(SRCROOT) value and add $(PROJECT_DIR)/... paths for every library and framework used within my app. I tried to just set $(PROJECT_DIR) with recursive value but I would get the same compiling time error so the solution was just to specify the path to every library and framework used.

希望这对遇到相同问题的其他人有所帮助.

Hope this helps to other folks that have the same issue.

这篇关于< unknown>:0:错误:打开模块"Swift"的导入文件:文件名太长的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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