码迷,mamicode.com
首页 > 移动开发 > 详细

iOS xcode缓存问题

时间:2015-12-28 15:33:11      阅读:192      评论:0      收藏:0      [点我收藏+]

标签:

Question:

When I try to build my app in Xcode, I get this error message:
PCH file built from a different branch ((clang-425.0.24)) than the compiler ((clang-425.0.27))

Answer:
This is often a caching problem. Usually it can be resolved by holding down the Option key and choosing Product > Clean
There is a Product > Clean, but it does a less thorough job. Some people can get buy with Product > Clean, for most Product > Clean Build Folder... is sufficient, and others need the manual removal as indicated in

 

之前有在代码全部正确的情况下,遇到过下面的编译错误:

fatal error: file ‘.....h‘ has been modified since the precompiled header ‘.....‘ was built.

note: please rebuld precompiled header ‘....‘.

解决方法是删除文件夹下/Users/username/Library/Developer/Xcode/DerivedData/ModuleCache下的所有文件,然后重新编译,一般就会好了.

但是偶尔在删除ModuleCache下文件之后,不仅没有解决上面的问题,还会报下面的错误:

fatal error: malformed or corrupted AST file: ‘Unable to load module "/Users/username/Library/Developer/Xcode/DerivedData/ModuleCache/GJQSWZVUR8F9/Foundation-PNFYWITLP4HB.pcm": module file not found‘

这个时候执行一下deep clean就可以了,具体的做法是按组合键“Option+Command+Shift+K”. 编译过程中的中间文件都会被删除,然后就可以通过编译了.

iOS xcode缓存问题

标签:

原文地址:http://www.cnblogs.com/wfwenchao/p/5082564.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!