Xcode 10.3 安装
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/57155654/
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
Xcode 10.3 Installation
提问by hgm
I have just been (involuntarily) upgraded to Xcode 10.3 (10G8). I'm getting the following error:
我刚刚(不自觉地)升级到 Xcode 10.3 (10G8)。我收到以下错误:
/Users/hgm/XCode/Gnosys/TGuide/TGPrep/Assets.xcassets:-1: Failed to find a suitable device for the type IBSimDeviceTypeiPad2x (com.apple.dt.Xcode.IBSimDeviceType.iPad-2x) with runtime iOS 12.4 (12.4 - 16G73) - com.apple.CoreSimulator.SimRuntime.iOS-12-4
/Users/hgm/XCode/Gnosys/TGuide/TGPrep/Assets.xcassets:-1: 无法找到适合 IBSimDeviceTypeiPad2x (com.apple.dt.Xcode.IBSimDeviceType.iPad-2x) 类型的设备,运行时为 iOS 12.4 ( 12.4 - 16G73) - com.apple.CoreSimulator.SimRuntime.iOS-12-4
It appears that the upgrade to Xcode is incomplete.
看来升级到Xcode 是不完整的。
How do I ensure a complete installation, if this is the problem?
如果这是问题,我如何确保完整安装?
回答by Admas.Cheng
Restarting your computer/macOS will resolve the issue.
重新启动您的计算机/macOS 将解决该问题。
回答by u11822231
Kill all simulator processes
杀死所有模拟器进程
$ sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService
Set the correct Xcode path
设置正确的Xcode路径
$ sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
If that doesn't work, reset all simulators
如果这不起作用,请重置所有模拟器
$ xcrun simctl erase all
回答by Tim Groeneveld
First, try to close any running Simulator and Xcode instances. Then, restart CoreSimulatorService.
首先,尝试关闭任何正在运行的 Simulator 和 Xcode 实例。然后,重新启动 CoreSimulatorService。
sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService
You should now be able to build and run your app without any issues.
您现在应该能够毫无问题地构建和运行您的应用程序。
If not, another issue that you might encounter is that the Xcode upgrade deleted some versions of iOS. You might need to download an iOS Simulator from Xcode. I upgraded from Xcode 10.2, to 10.3, and no simulator was available.
如果没有,您可能会遇到的另一个问题是 Xcode 升级删除了某些版本的 iOS。您可能需要从 Xcode 下载 iOS 模拟器。我从 Xcode 10.2 升级到 10.3,但没有可用的模拟器。
Go to Xcode
-> Preferences
, and click on Components
.
转到Xcode
-> Preferences
,然后单击Components
。
From there you will be able to download a version of iOS.
从那里您将能够下载一个 iOS 版本。
After the download is complete, close any running Simulator and Xcode instances again and try restarting CoreSimulatorService.
下载完成后,再次关闭所有正在运行的 Simulator 和 Xcode 实例,然后尝试重新启动 CoreSimulatorService。
sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService
回答by Elliot Wang
- Delete Xcode in Launchpad.
- Clean ~/Library/Developer folder.
- Open the App Store, the Xcode APP button will be "Open".
- Open it.
it worked fine or me.
I have cleaned Xcode folder and project, but it did not work.
- 在 Launchpad 中删除 Xcode。
- 清理 ~/Library/Developer 文件夹。
- 打开 App Store,Xcode APP 按钮将是“打开”。
- 打开它。
它工作正常或我。
我已经清理了 Xcode 文件夹和项目,但是没有用。
回答by Eerko
I had the same issue and could only resolve it by downloading the iOS versions again (from Xcode Preferences > Components) that are used in my list of simulators. After that a rebuild (command-B) resolved the error.
我遇到了同样的问题,只能通过再次下载我的模拟器列表中使用的 iOS 版本(从 Xcode Preferences > Components)来解决它。之后重建(command-B)解决了错误。
In my case downloading iOS 10.3.1 was the solution, but your used versions may differ.
就我而言,下载 iOS 10.3.1 是解决方案,但您使用的版本可能会有所不同。