运行目标无效 Xcode

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19654536/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 04:13:25  来源:igfitidea点击:

The Run Destination is not valid Xcode

iphonexcodeios7

提问by ichanduu

I am using Xcode 5and when I try to run my app on iOS 6simulator I am getting the following error.

我正在使用Xcode 5,当我尝试在iOS 6模拟器上运行我的应用程序时,出现以下错误。

 The scheme 'Appname' contains no buildables that can be built for the 
`SDKs` supported by the run destination iPhone Retina (4-inch). Make sure your 
targets all specify `SDKs` that are supported by this version of `Xcode`.

Base SDKis set to iOS SDK 7.0. iOS deployment target is set to iOS 6.0

基数SDK设置为iOS SDK 7.0。iOS 部署目标设置为iOS 6.0

回答by Sandy

For me, select the Project from the Project Navigator and then select the target -> go build settings and change the iOS Deployment Target. That's worked for me.Let me know if you still facing issue.

对我来说,从 Project Navigator 中选择 Project,然后选择目标 -> go build settings 并更改 iOS 部署目标。这对我有用。如果您仍然遇到问题,请告诉我。

回答by Alexey Bondarchuk

Looks like you are trying to run app on the iPhone while your application allows you only iPad platform. enter image description here

看起来您正在尝试在 iPhone 上运行应用程序,而您的应用程序只允许您使用 iPad 平台。 在此处输入图片说明

回答by Rajesh Loganathan

Try this simple one:

试试这个简单的:

Target 
   '---> General 
             '---> Deployment Info  
                          '---> Deployment Target 
                                     '---> Choose Version (Better lower version)

回答by Nikos M.

Try Autocreating schemes (Scheme > Manage schemes > Autocreate schemes) to see if this solves your issue.

尝试自动创建方案(方案 > 管理方案 > 自动创建方案),看看这是否能解决您的问题。

Also make sure that your build settings are correct. They should look like the image below.

还要确保您的构建设置正确。它们应该如下图所示。

enter image description here

在此处输入图片说明

回答by csomakk

If its an Apple Watch app: Needed to install latest xcode to have watchkit. (I got the package from github.)

如果是 Apple Watch 应用:需要安装最新的 xcode 才能拥有 watchkit。(我从 github 得到了这个包。)

回答by Aweda

I had exactly same issues, however after restarting My (Xcode 9.2) IDE the issue disappeared!

我遇到了完全相同的问题,但是在重新启动我的(Xcode 9.2)IDE 后,问题消失了!