xcode 无法启动设备,因为它无法位于磁盘上

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/47445797/
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 10:27:05  来源:igfitidea点击:

Unable to boot device because it cannot be located on disk

iosxcodexcode9.1

提问by Milan Jansen

The device's data is no longer present at /Users/[user name]/Library/Developer/CoreSimulator/Devices/D651BCC7-29FD-4B91-82F6-E255E856EA2F/data.

设备的数据不再存在于/Users/[user name]/Library/Developer/CoreSimulator/Devices/D651BCC7-29FD-4B91-82F6-E255E856EA2F/data。

I uninstalled xcode 9 and installed xcode 9.1, but when run project, following message was shown:

我卸载了 xcode 9 并安装了 xcode 9.1,但是在运行项目时,显示以下消息:

Unable to boot device because it cannot be located on disk. The device's data is no longer present at /Users/[user name]/Library/Developer/CoreSimulator/Devices/D651BCC7-29FD-4B91-82F6-E255E856EA2F/data.

无法启动设备,因为它无法位于磁盘上。设备的数据不再存在于 /Users/[user name]/Library/Developer/CoreSimulator/Devices/D651BCC7-29FD-4B91-82F6-E255E856EA2F/data。

I found "Developer" folder, but cannot find "CoreSimulator" folder.

我找到了“Developer”文件夹,但找不到“CoreSimulator”文件夹。

回答by Tomá? Linhart

I was able to resolve the issue running xcrun simctl erase allin Terminal.

我能够解决xcrun simctl erase all在终端中运行的问题。

回答by IKKA

Quit Xcode.app, Simulator.app, etc

退出 Xcode.app、Simulator.app 等

Try the follwing commands in terminal

在终端中尝试以下命令

sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService

须藤 killall -9 com.apple.CoreSimulator.CoreSimulatorService

rm -rf ~/Library/*/CoreSimulator

rm -rf ~/Library/*/CoreSimulator

回答by Itachi

Go to Xcode menu Window-> Devices and Simulators-> Simulatorstab, right-click the bad simulator and choose Deletefrom the menu list, then add it back from the left bottom entry again, it works!

转到 Xcode 菜单Window-> Devices and Simulators->Simulators选项卡,右键单击坏模拟器并Delete从菜单列表中选择,然后再次从左下角条目添加回来,它可以工作!

enter image description here

在此处输入图片说明

回答by Nick Meehan

Click on the simulators dropdown at the top of Xcode, and select Download Simulators....

单击 Xcode 顶部的模拟器下拉菜单,然后选择Download Simulators....

Simulators Dropdown

模拟器下拉菜单

From here, you can select which versions you want to download and for what devices.

从这里,您可以选择要下载的版本以及适用于哪些设备。