“运行目标 iOS 设备对运行方案无效”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16049665/
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
"The run destination iOS Device is not valid for running the scheme"
提问by Gruntcakes
I've been running my app on an iPhone 5 /iOS 6, but when I try to run it on an iPhone 4S / iOS6 I get "The run destination iOS Device is not valid for running the scheme NN. The Scheme contains no buildables that can be built for the architectures supported by the run designation device".
我一直在 iPhone 5 / iOS 6 上运行我的应用程序,但是当我尝试在 iPhone 4S / iOS6 上运行它时,我得到“运行目标 iOS 设备对于运行方案 NN 无效。该方案不包含可构建的可以为运行指定设备支持的体系结构构建”。
I've looked at previous postings on this but they involve issues with the Deployment Target. In my case I've got the Base SDK set to 6.1 and the Deployment Target set to 5.0.
我已经看过以前的帖子,但它们涉及部署目标的问题。就我而言,我已将 Base SDK 设置为 6.1,并将部署目标设置为 5.0。
The iPhone 4 has got iOS version 6.0.1.
iPhone 4 的 iOS 版本为 6.0.1。
回答by Gruntcakes
It was a bug in XCode, I closed and reopened Xcode and it started working.
这是 XCode 中的一个错误,我关闭并重新打开 Xcode,它开始工作。
I've noticed this sort of thing many many times now with Xcode with other problems, its very frustrating that the tool is so dodgy.
我已经多次注意到这种事情,因为 Xcode 有其他问题,该工具如此狡猾令人非常沮丧。
回答by geek1706
Just quit XCode and restart (XCode 9.0.1)
只需退出 XCode 并重新启动(XCode 9.0.1)
回答by Kunal Gupta
I had the same problem. The issue that i found is that , by mistake I had chosen iPad as deployment target due to which XCode showed that iPhone 5 is an invalid device. .
Hope it helps. Then I just changed the target to iPhone and it worked.
我有同样的问题。我发现的问题是,由于 XCode 显示 iPhone 5 是无效设备,我错误地选择了 iPad 作为部署目标。. 希望能帮助到你。然后我只是将目标更改为 iPhone 并且它起作用了。
回答by manish kumar
This is some sort of memory issue sometimes.Close some application and try again.
有时这是某种内存问题。关闭一些应用程序,然后重试。
Close Xcode too and reopen. Worked for me.
关闭 Xcode 并重新打开。为我工作。
Cheers.
干杯。
回答by Mahesh Chaudhari
The run destination iPhone is not valid for Running the scheme.
运行目标 iPhone 对运行方案无效。
- Quit Xcode
- Open Xcode
- Clean project
- Run project
- 退出 Xcode
- 打开 Xcode
- 清洁工程
- 运行项目
It will work
它会工作
回答by Zany
Just restart Xcode and then your issue will be sought out automatically.
只需重新启动 Xcode,然后您的问题就会自动找到。
回答by yuanjilee
Quit and Reset Xcode
can reslove most problem. The other cause is Device
not support iPhone, you can
Quit and Reset Xcode
可以解决大多数问题。另一个原因是Device
不支持iPhone,你可以
Target
-> select scheme -> General
-> Deployment Info
-> Device
-> select Universal
or the current device you want.
Target
-> 选择方案 -> General
-> Deployment Info
-> Device
-> 选择Universal
或您想要的当前设备。
回答by Andrea Leganza
回答by Apostolos Chalkias
A simple solution.
一个简单的解决方案。
1) Force quit X-Code
1) 强制退出 X-Code
2) Force quit itunes
2)强制退出iTunes
3) Reconnect iPhone
3) 重新连接 iPhone
4) Open X-Code
4) 打开 X 代码
回答by SirEnder
I had this problem in XCode 9.0.1.
我在 XCode 9.0.1 中遇到了这个问题。
It seems that XCode does not refresh the list of connected devices.
似乎 XCode 不会刷新已连接设备的列表。
You may notice that after disconnecting your device, you can still choose it as a target. So XCode may actually be trying to connect to a bogus device.
您可能会注意到,在断开设备连接后,您仍然可以选择它作为目标。所以 XCode 可能实际上是在尝试连接到一个伪造的设备。
To fix this:
要解决此问题:
- Edit the scheme.
- Re-select the scheme's executable.
- this seems to force XCode to update the list of connected devices.
- 编辑方案。
- 重新选择方案的可执行文件。
- 这似乎迫使 XCode 更新已连接设备的列表。
If that did not work, try reconnecting your device (cable) before you do this.
如果这不起作用,请在执行此操作之前尝试重新连接您的设备(电缆)。
Or perhaps, some other combination of disconnecting device, connecting device, and re-selecting the scheme's executable.
或者,可能是断开设备、连接设备和重新选择方案的可执行文件的其他组合。
As a desperate measure, you may also try to change the cable that connects your mobile device to your pc.
作为一种绝望的措施,您还可以尝试更换将移动设备连接到 PC 的电缆。
But ideally... Xcode should be fixed.
但理想情况下...... Xcode 应该是固定的。