简体   繁体   English

无法启动模拟器

[英]Unable to boot the simulator

I'm new in development for iOS.我是 iOS 的开发新手。 My problem was when I run my project, the simulator was with black screen and a message shows "Unable to boot the simulator".我的问题是当我运行我的项目时,模拟器出现黑屏,并显示一条消息“无法启动模拟器”。 I'm working with Xcode version 7.3.1.我正在使用 Xcode 版本 7.3.1。

在此处输入图像描述

Change the tmp folder permission will solve the problem更改tmp文件夹权限即可解决问题

Open terminal -> chmod 777 tmp打开终端-> chmod 777 tmp

I got this issue today (Oct 25, 2018) while working on a computer with a Mojave 10.14.0 beta, which I believed has "expired".我今天(2018 年 10 月 25 日)在使用 Mojave 10.14.0 beta 的计算机上工作时遇到了这个问题,我认为它已经“过期”。

Everything in the system worked well, except for the simulators.系统中的一切都运行良好,除了模拟器。 I couldn't launch any of them (iOS, tvOS...).我无法启动它们中的任何一个(iOS、tvOS ...)。

Upgrading the OS to 10.14 (final version) solved the issue.将操作系统升级到 10.14(最终版本)解决了这个问题。

Try to reset content and settings of simulator by clicking on the simulator tab on the top.尝试通过单击顶部的模拟器选项卡来重置模拟器的内容和设置。

In this case, launchd is crashing when trying to launch This could be as a result of deleting the /private/tmp folder.在这种情况下,launchd 在尝试启动时崩溃 这可能是由于删除了 /private/tmp 文件夹。 To resolve this go to terminal and use this command.将此 go 解析到终端并使用此命令。

sudo mkdir /private/tmp sudo mkdir /私人/tmp

sudo chmod 1777 /private/tmp sudo chmod 1777 /私人/tmp

Go to About this Mac > Storage > Manage > Delete XCode Cache and all old versions of iOS. Go 至 关于本机 > 存储 > 管理 > 删除 XCode 缓存和 iOS 的所有旧版本。 Then run again然后再次运行

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

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