Xcode 构建时出现格式错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22942144/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 04:51:23  来源:igfitidea点击:

Xcode builds with malformed error

iosxcodemalformed

提问by user3511110

I am getting three weird errors that I never seen before. Can anyone help me find a solution to these errors?

我收到了三个我从未见过的奇怪错误。谁能帮我找到这些错误的解决方案?

Definition of CGAffineTransform (aka struct CGAffineTransform) must be imported from module CoreText.CTFontDescriptor before it is required

Definition of CGAffineTransform (aka struct CGAffineTransform) must be imported from module CoreText.CTFontDescriptor before it is required

'Unable to load module "/Users/dev/Library/Developer/Xcode/DerivedData/ModuleCache/17NOBVXZ77TGU/Foundation.pcm": module file out of date'

Malformed or corrupted AST file: 'could not find file '/Users/dev/Documents/App Projects/projectname/./CoreGraphics.framework/Headers/CGAffineTransform.h' referenced by AST file'

'无法加载模块“/Users/dev/Library/Developer/Xcode/DerivedData/ModuleCache/17NOBVXZ77TGU/Foundation.pcm”:模块文件已过期'

格式错误或损坏的 AST 文件:“无法找到 AST 文件引用的文件 '/Users/dev/Documents/App Projects/projectname/./CoreGraphics.framework/Headers/CGAffineTransform.h'”

回答by Michael Loo

This seems to be similar to what is mentioned here.

这似乎类似于这里提到的内容。

Deleting the folders in the DerivedDatafolder and do a deep clean with Cmd + Shift + k

删除文件夹中的DerivedData文件夹并进行深度清理Cmd + Shift + k

Hope that helps,

希望有所帮助,

Regards,

问候,

Michael Loo

迈克尔·卢