Can't make Xcode 4 run a barely empty project

2019-07-22 15:34发布

I created a blank NavBar project and only touched a couple lines or so on one of the view controllers. I tested it fine in the 4.3 iPad and iPhone emulator but can't make it work for 4.2 at all. I get an error saying:

The selected run destination is not valid for this action.

This is what I have on my project settings:

Screenshot of my project settings

Usually in XCode 3 that was all I needed to change but I guess I'm missing some setting in XCode 4.

What could this be?

2条回答
Bombasti
2楼-- · 2019-07-22 16:02

I really had troubles with this and none of the hints helped. Finally I got an error message that pointed to an old file in the build folder, in the end a simple clean did resolve my issues (shift+cmd+K). It compiled fine. So remember to clean your current build after you changed the build settings in Xcode4. This may be obvious, but at that moment it wasn't obvious to me.

查看更多
我欲成王,谁敢阻挡
3楼-- · 2019-07-22 16:15

@pokstad, you are right. I was looking at the wrong place indeed!

Choosing the target and changing the SDk there did the trick.

Thanks!

查看更多
登录 后发表回答