Unable to build using Xcode 4 - The selected run destination is not valid for this action

后端 未结 12 2132
耶瑟儿~
耶瑟儿~ 2021-01-30 21:44

So I\'m horribly confused by this error, other threads on Stack Overflow mention I should set the SDK, but I see no option to do this. I\'m trying to build:http://wafflesoftwar

相关标签:
12条回答
  • 2021-01-30 21:51

    Firstly, I have observed that when Xcode 4 decides my Mac is 64 bit and all my other schemes have vanished, a restart of Xcode fixes that.

    If you still have the issue after a restart, go to Manage Schemes... (under the Product Menu) and click on Autocreate Schemes now button. Try to delete the other schemes and see if you can run the project now.

    However, if the issue is that you need to set the SDK, that's different:

    1. Click on the top-level project icon in the left hand panel
    2. In the right hand panel that appears, select Build Settings (near the top).
    3. Select "All" option (instead of Combined)
    4. Ensure Base SDK is set appropriately, like "OS X 10.7".

    FWIW I'm seriously considering reverting to Xcode 3.2.5 at the moment, 4 seems horrendously buggy.

    0 讨论(0)
  • 2021-01-30 21:53

    I fixed this by deleting my xcuserdata in my Project file. Not sure how it got corrupt. But it worked for everyone else in the office, deleting the xcuserdata did the trick. I made sure Xcode was closed while doing so. Just for fun, make sure you delete your DerivedData folder for the app, and do a build clean for superstitious folks.

    0 讨论(0)
  • 2021-01-30 21:54

    It sounds as if you're trying to run (Cmd-R or run button) the framework (which you can't do - it's not an executable, just a library) rather than simply build it (Cmd-B).

    0 讨论(0)
  • 2021-01-30 21:55

    In xCode 4.4.1, use Validate Settings to solve the problem!

    I can select either 32bit or 64bit now.

    0 讨论(0)
  • 2021-01-30 21:55

    I found a good practice for moving from Xcode 3.2.X to Xcode 4 is, to remove any references to older SDKs (in the case of Mac OS to remove any Base SDK Ref, etc., for Mac OS <= 10.5, in the case of iOS I think you need to remove everything <= 4.3) PRIOR to upgrading to Xcode 4.

    I never experienced any problems for new Projects, created in Xcode 4, only for such that where created with Xcode 3.X or 2.X

    0 讨论(0)
  • 2021-01-30 21:57

    If this happened after you renamed your app, go to Schemes -> Edit Scheme -> Run <YourApp> -> Info Select the right executable file (YourApp.app)

    Another way is to select None as executable and then reselect the YourApp.app from your Debug-iPhoneOS folder.

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