Xcode 4 Preview 4 displays "Build Succeeded" but with errors
Xcode 4 Preview 4 displays "Build Succeeded", as show the image below there are 5 erros. Actually there are more than 5 err开发者_StackOverflowors, but it seems that Xcode doesn't build anymore. It happened when i built the project in xcode 3 while the xcode 4 was open with the same project. Anyone have an idea to overcome this bug and reestablish the Xcode??
I tried to restart the Xcode, restart the mac. I don't know how to clean up the build. The "clean all" option in Product menu is unable.
Thanks in advance.
Follow these steps:
- Edit your
PCH
file - Save it again.
- Clean and build
- No 4th step.
Hope it helps!
Try going into your Build
directory and simply deleting everything.
For Xcode 3, the build directory is usually located inside your main project folder. For xcode 4, as discussed in this question, can be found, by default, in ~/Library/Developer/Xcode/DerivedData
.
Also, be aware that you won't be able to clean a target if it's running inside the simulator (though it seems like that doesn't apply in this case.)
I just got this error today and want to explain what I did in case anyone else encounters it.
Xcode would display errors but the build would be successful and run in Simulator. I created a new project from scratch and the same thing happened. I'd insert random lines like "saedrw34" and it would highlight it with the red exclamation point. But the code would still build and run.
Check the autosave settings: Xcode-->Preferences-->General: Auto-save --> Set to Always.
I remembered that prior to my problems I had changed it to "Never." I didn't realize Xcode, when you hit Run, compiles the latest saved version on your hard drive, not the current version you see on the screen. So basically, it was building a different version than the one with errors.
May be different from your situation but thought I'd just pass it along..
For me the following worked:
- Got to the "File Inspector" and uncheck the targets under "Target Membership"
- Build the project (maybe also clean build)
- Check the unchecked targets under "Target Membership"
- Build the project
精彩评论