Unable to boot device due to insufficient system resources

网友投稿 793 2022-10-17

Unable to boot device due to insufficient system resources

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.在启动模拟器后的某个时间,通过启动其他程序或打开其他文件,可能会超过最大进程数或最大打开文件数。如果发生这种情况,模拟器不会向您发出警告。效果取决于哪个程序试图启动进程或打开文件。 方法三:关闭其它模拟器。

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:SpringBoot实现token登录的示例代码
下一篇:杭州第三大世界文化遗产--良渚古城遗址
相关文章

 发表评论

暂时没有评论,来抢沙发吧~