简体   繁体   中英

How to solve the apple LLVM 5.0 error in xcode 5?

I was running my application without any problems on both the simulator and device. All of a sudden i get this error:

fatal error: file  '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UICollectionView.h' has been modified since the precompiled header '/Users/rashidasgari/Library/Developer/Xcode/DerivedData/ModuleCache/SWBH8ZAWBXAH/UIKit.pcm' was built
note: after modifying system headers, please delete the module cache at '/Users/rashidasgari/Library/Developer/Xcode/DerivedData/ModuleCache/SWBH8ZAWBXAH'

I tried any solution i could find and still no luck. Note that i tried running the application on another MacBook and everything works fine without any errors.

Cleaning the project is the first port of call (menu under Product ).

If that doesn't help, delete the derived data. That can be done via the Locations section of the preferences or by navigating to the directory in Finder and deleting it (there is a little -> button in preferences to get there, or use Go To Folder... option in the Finder.

在尝试了几乎所有的网络解决方案后,我决定重新安装xcode,它终于有效了。

I solved this problem by changing DerivedData folder name..see how i did

Xcode->preferences->Then you will be redirected to preferences screen

Then click on locations tab under menu selection->then you will have options like Derived data,snap shots ,archives

under Derived data you can see some thing like /Users/SENABI/Library/Developer/Xcode/DerivedData-> then click on that arrow button that's it there you can see DerivedData folder click on that and rename it. your error will be removed. This is my experience and it worked for me hope it will be helpful to someone.

Error occurs when system header files are modified.

Solution :

  • If you have the backup of XCode then reinstall the XCode (Better solution).
  • Delete the DerivedData folder and then build the project

Use CMD+Shift+K to clean the build and then relaunch. This should solve the issue.

you don't have to delete anything. you messed up a git pull somewhere probably. just quit Xcode and the simulator, reset any changes (or stash them) try another git pull, start Xcode again, clean your project and run it again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM