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

方法三:关闭其它模拟器。


目录
相关文章
|
6月前
|
Oracle 关系型数据库
Customer RecommendedORA-27090 - Unable to Reserve Kernel Resources for Asynchronous Disk I/O
Customer RecommendedORA-27090 - Unable to Reserve Kernel Resources for Asynchronous Disk I/O
49 4
ERROR: Encountered errors while bringing up the project.
ERROR: Encountered errors while bringing up the project.
164 0
|
Java 应用服务中间件
Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
error: insufficient permissions for device
error: insufficient permissions for device
384 0
|
并行计算 PyTorch 算法框架/工具
CUDA unknown error - this may be due to an incorrectly set up environment 问题解决
CUDA unknown error - this may be due to an incorrectly set up environment 问题解决
CUDA unknown error - this may be due to an incorrectly set up environment 问题解决
|
安全 Java 网络安全
PKIX path building failed
生产环境业务流程走不通,查了es后以为请求其他服务器资源有错,错误如下: [http-nio-9097-exec-1] sun.security.validator.ValidatorException: PKIX path building fai led: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target java
982 0
|
Java 应用服务中间件 Maven
Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean解决方案N种
Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean解决方案N种
359 0
|
Java
Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
自己新建的Maven 项目,然后通过修改 pom.xml 转为 Spring Boot 项目,出现此问题。 启动日志如下: org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.
2047 0