我在编译时遇到错误:Opening import file for module 'Swift': Not a directory我在网上搜索过,他们建议清理对我不起作用的项目.知道是什么原因导致了此错误吗?解决方案当我的Framework Search Path和User Header Search Paths中的框架路径无效时,出现此错误.我只是通过在路径末尾添加".framework"来固定路径,以使路径有效,然后该错误消失了.After following the instructions here to setup libxml on Swift:libxml/tree.h no such file or directoryI encountered an error while compiling which said:Opening import file for module 'Swift': Not a directoryI've searched online and they recommending cleaning the project which didn't work for me. Any idea what's causing this error? 解决方案 I got this error when I had an invalid path to a framework in my Framework Search Path and User Header Search Paths.I simply fixed the path by adding ".framework" to the end of the path, to make the path valid, and this error went away. 这篇关于打开模块"Swift"的导入文件:不是目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!