Xcode 4 Preview 4 displays “Build Succeeded” but with errors

后端 未结 4 1682
天命终不由人
天命终不由人 2020-12-31 19:51

Xcode 4 Preview 4 displays \"Build Succeeded\", as show the image below there are 5 erros. Actually there are more than 5 errors, but it seems that Xcode doesn\'t build anym

相关标签:
4条回答
  • 2020-12-31 20:36

    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..

    0 讨论(0)
  • 2020-12-31 20:39

    For me the following worked:

    1. Got to the "File Inspector" and uncheck the targets under "Target Membership"
    2. Build the project (maybe also clean build)
    3. Check the unchecked targets under "Target Membership"
    4. Build the project
    0 讨论(0)
  • 2020-12-31 20:41

    Follow these steps:

    1. Edit your PCH file
    2. Save it again.
    3. Clean and build
    4. No 4th step.

    Hope it helps!

    0 讨论(0)
  • 2020-12-31 20:55

    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.)

    0 讨论(0)
提交回复
热议问题