Unable to boot device due to insufficient system resources

Unable to boot device due to insufficient system resources,模拟器起的太多,导致资源不够。解决方案关闭其它模拟器,只使用一个模拟器。
在iOS开发中,在运行代码之后可能会做多个屏幕尺寸的对比,来查看界面控件的布局和位置,但是如果同时打开多个Xcode里面的模拟器手机尺寸之后,就不能再打开手机模拟器了,原因是模拟器的内存超出最大的限额,苹果开发者官网也有相关的解释文档,要想解决这个问题,方法就是通过修改内存大小来启动更多的模拟器,最好的方法就是通过关闭/重启模拟设备和其他Mac应用程序释放资源。
一、错误问题提示:
在这里插入图片描述
二、引起错误的原因

运行多个模拟器之后,使得模拟器内存超出最大限额

三、解决方法

方法一、引起该问题是模拟器的内存超出最大限额,可以通过修改内存大小来启动更多的模拟器

终端命令步骤:

1、首先查看当前权限:launchctl limit

2、修改多文件的限制,也就是修改maxfiles项,使用命令:sudo launchctl limit maxfiles 1024 unlimited //1024是maxfiles项数,根据实际情况来设置
方法二、参考苹果开发者官网的文档说明
原文如下:

Insufficient resources error when trying to launch a simulator尝试启动模拟器时出现资源不足错误

Launching a simulator can result in an error alert that there are insufficient system resources. This usually occurs when launching a simulator exceeds either the maximum number of active processes or the maximum number of open files. The best solution is to free up resources by closing simulated devices and other Mac applications.启动模拟器会导致系统资源不足的错误警报。当启动模拟器超过活动进程的最大数量或打开文件的最大数量时,通常会发生这种情况。最好的解决方案是通过关闭模拟设备和其他Mac应用程序释放资源
If it is not possible to free up enough resources, you can raise the system limits until the Mac is restarted.如果无法释放足够的资源,可以提高系统限制,直到Mac重新启动。

Note: It is possible to exceed the maximum number of process or the maximum number of open files by launching other programs or opening other files some time after you have launched a simulator. If this occurs, Simulator does not give you a warning. The effects depend on what program is trying to launch the process or open the file.在启动模拟器后的某个时间,通过启动其他程序或打开其他文件,可能会超过最大进程数或最大打开文件数。如果发生这种情况,模拟器不会向您发出警告。效果取决于哪个程序试图启动进程或打开文件。
方法三:关闭其它模拟器。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值