Can't get rid of Apple LLVM 5.0 Error

2020-05-19 03:48发布

It keeps saying:

fatal error: file '/Applications/Xcode5-DP5.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/objc/NSObject.h'

has been modified since the precompiled header

'/Users/jackiexu/Library/Developer/Xcode/DerivedData/ModuleCache/2MWVPCGUMQ29P/ObjectiveC.pcm' was built

note: after modifying system headers, please delete the module cache at '/Users/jackiexu/Library/Developer/Xcode/DerivedData/ModuleCache/2MWVPCGUMQ29P'

1 error generated.

I must have deleted the derived data at least five times by now, and I'm getting nowhere. Any ideas?

标签: ios xcode xcode5
14条回答
Melony?
2楼-- · 2020-05-19 04:35

Have you tried reinstalling xcode? And have you cleaned using cmd+shift+k ?

查看更多
在下西门庆
3楼-- · 2020-05-19 04:41

In addition to all of the other "clean your build" answers, nothing was working for me until I emptied out the (highly undocumented!) /var/folders directory.

Apparently, this is a "miscellaneous caches" dir maintained by OS-X. I didn't even bother figuring out what were "the correct files"; I just cleaned out the entire directory.

...And now I can build again. Hooray! From terminal:

[sudo] rm -rf /var/folders/*

(Although I did it from Finder, via authentication.) (OS-X 10.9.latest)

Additional clue: I could build with XCode-6-beta, but got the goofy corrupt error in XCode-5.

查看更多
▲ chillily
4楼-- · 2020-05-19 04:42

my solution,

in terminal, run command:

rm -rf /Users/jackiexu/Library/Developer/Xcode/DerivedData/ModuleCache/2MWVPCGUMQ29P

then in xcode, clean then restart xcode and build

查看更多
孤傲高冷的网名
5楼-- · 2020-05-19 04:44

I was having the same problem. I did SHFT+CMD+K and tried to run,again the error appeared. My error pointed to the NSJSONSerialization header file. So what I did is deleted the files in ModuleCache and the project seems working now. I had changed my code which used NSJSonSerialization thinking it to be wrong, and project started working with the code also :)

To delete the files -- Click on 'Go' in the Desktop and then 'Go to folder' then type the folder path (Eg : 'Library/.…./ModuleCache') and delete all the files.

Regards, ASK

查看更多
劳资没心,怎么记你
6楼-- · 2020-05-19 04:44

I was facing the same issue. I first cleaned the project do this by hitting "shift + command + k" and just rebuilt the project and it worked for me. hit "command + B" to rebuilt your project

查看更多
\"骚年 ilove
7楼-- · 2020-05-19 04:45

as per xcode 5.

  1. click on Xcode preferences
  2. Goto locations tab
  3. click on the derived data path which navigates to the folder called DerivedData
  4. Delete the whole folder and restart xcode.

This works fine for me.

Happy coding :)

查看更多
登录 后发表回答