xCode 无法使用所选设备运行错误!
当我尝试在设备上运行该应用程序时,突然出现以下错误。
“xCode 无法使用所选设备运行” 没有可用的预配 iOS 设备。连接 iOS 设备或选择 iOS 模拟器作为目标。
如果我在组织者中看到,我会得到以下信息:
更新:我尝试运行我的一个旧应用程序,它运行良好。当我运行旧应用程序时,显示应用程序是否在模拟器或设备上运行的下拉列表会自动填充。它正确列出了我的设备名称。当我尝试运行我的新应用程序时,它只显示 iosdevice 选项和模拟器选项。
All of a sudden I am getting the following error when I try to run the app on the device.
"xCode cannot run using the selected device" No provisioned iOS devices are available. Connect an iOS device or choose an iOS simulator as the destination.
If I see in the organizer I get the following information:
UPDATE: I tried running one of my old applications and it worked fine. The dropdown which shows if the app is running on simulator or device automatically gets populated when I run my old app. It list my device name correctly. When I try to run my new app then it only shows iosdevice option and simulator option.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
XCode 4 有一个有趣的小错误,您可以通过以下方式修复它:
检查您在目标下选择的 iOS SDK 版本。单击导航树中的项目,然后单击摘要。您应该看到“部署目标”。如果它是灰色的,那么它正在被自动填充。由于某种原因,这会导致“未配置设备”错误。
(编辑:您标记为 XCode 4,所以没有理由说“如果您正在运行...”)
通过单击项目等,我的意思如下:
使用导航树,您必须选择不同的文件进行编辑,然后滚动到其顶部。顶部应该是一个蓝色的 XCode 图标,标记为文件(我知道,它充当目录),并带有项目名称。单击该按钮。在右侧打开的窗口中,您应该看到一个选项卡栏,其中有一个标有“摘要”的选项卡。在摘要下,检查部署目标。
XCode 4 has a fun little bug, here's how you might fix it:
Check what version of iOS SDK you have selected under your target. Click on the project in the nav tree, then summary. You should see a 'deployment target'. If that's in grey, then it's being auto filled. For some reason, this causes the 'no provisioned device' error.
(Edited: You tagged for XCode 4, so no reason to say 'if you're running...')
By click on project, etc etc, I mean the following:
Use the navigation tree you have to select different files to edit, and scroll to the top of it. At the top should be a blue XCode icon labeled file (that acts as a directory, I know) with the name of the project. Click on that. In the window that opens on the right, you should see a tab bar with a tab labeled 'summary'. Under summary, check the deployment target.
你可能已经尝试过这个,但我发现这种事情通常可以通过拔掉/重新启动设备,然后退出/重新启动 Xcode 来解决。如果失败,我会查看项目操作系统版本设置、设备上的配置文件(过期?)等。
You may have already tried this, but I've found that this kind of thing is often solved by unplugging/restarting the device, and quitting/restarting Xcode. If that fails, I'd look at project OS version settings, provisioning profiles on the device (expired?), etc.
我已使用以下步骤解决了该问题。
关闭 Xcode
从设备中删除应用程序
重新启动设备,
然后重新运行应用程序,
它工作正常。
I have solve the problem using the below steps.
Close the Xcode
Delete the application from device
Restart the device
then re-run the application
it working fine..
您的配置文件是否已过期?您使用的配置文件是否能够配置您正在安装的应用程序?
Has your provisioning profile expired? Is the profile you are using able to provision the app you are installing?