简体   繁体   English

无法启动IOS模拟器

[英]Unable to boot the IOS simulator

When I'm running project build is succeeded, but simulator is not loading saying message "Unable to boot the simulator".当我运行项目构建成功时,但模拟器未加载说消息“无法启动模拟器”。 Im only able to test in real device.我只能在真机上测试。

Please help me .请帮帮我。

Thank you....谢谢....

It's hard to say what exactly is the problem.很难说到底是什么问题。 But there are only 3 possibilities that I can think of:但是我能想到的只有3种可能性:

  1. the iOS image that simulator tries to load is corrupted/not downloaded properly.模拟器尝试加载的 iOS 图像已损坏/未正确下载。
  2. You are using a CPU architecture that is not supported by iOS simulator.您正在使用 iOS 模拟器不支持的 CPU 架构。
  3. File permission issues.文件权限问题。 You are running XCode from a location or by a user that doesn't give you enough access to load the iOS images.您正在从一个位置或用户运行 XCode,该位置或用户没有足够的权限来加载 iOS 图像。

Had exactly the same problem at the time of the original post.在原始帖子发布时遇到了完全相同的问题。 Everything was working fine a day before, running OS X 10.11.6, with both XCode 7.1.1 & XCode 8 installations.前一天一切正常,运行 OS X 10.11.6,同时安装了 XCode 7.1.1 和 XCode 8。 Tried everything from rebooting, cleaning, etc. to reinstalling XCode without any success.尝试了从重启、清理等到重新安装 XCode 的所有方法,但没有成功。

In my case, permissions for "private/tmp" mysteriously changed.就我而言,“private/tmp”的权限神秘地改变了。

  1. check .../Library/Logs/DiagnosticReports for crashes of "launchd_sim" and possible hints检查 .../Library/Logs/DiagnosticReports 是否有“launchd_sim”崩溃和可能的提示
  2. open terminal and run "sudo /usr/libexec/repair_packages --verify --standard-pkgs /".打开终端并运行“sudo /usr/libexec/repair_packages --verify --standard-pkgs /”。 If it says something about "private/tmp", you're likely having the same issue.如果它说的是“private/tmp”,您可能会遇到同样的问题。
  3. either try to repair the permissions yourself ( it's a pain with El Capitan ), or run a OS X update if you haven't.要么尝试自己修复权限(El Capitan 很麻烦),要么运行 OS X 更新(如果还没有)。 The later did the trick for me...后来为我做了伎俩......

Hope it solves your problem as well.希望它也能解决您的问题。

这是一个奇怪的问题,但更新到 macOS Sierra 似乎可以解决它。

下载最新的模拟器(Preference - Components),安装好后,再次运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM