当前位置: 首页 > 知识库问答 >
问题:

ionic cordova无法为2097152KB对象堆保留足够的空间

柯锋
2023-03-14

我试图为Android生成一个发布版本,但是在命令之后:“离子科尔多瓦构建 - 发布机器人”我有例外:

FAILURE: Build failed with an exception.

* What went wrong:
Unable to start the daemon process.

This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at https://docs.gradle.org/4.1/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org
(node:7276) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at https://docs.gradle.org/4.1/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org
(node:7276) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

我试过这个:开始-

共有1个答案

洪建茗
2023-03-14

查看SO帖子中的答案。您可以在环境变量下的系统变量中设置_JAVA_OPTIONS。

另一种选择是从32位JDK切换到64位JDK。希望有帮助

 类似资料:
  • 我是科尔多瓦的新手,正在尝试创建一个机器人HelloWold项目。 当我使用时,它会引发一些异常:

  • 问题内容: 每次尝试运行该程序时,我都会反复收到以下异常。 VM初始化期间发生错误 无法为对象堆保留足够的空间 无法创建Java虚拟机。 我试图增加虚拟内存(页面大小)和RAM大小,但无济于事。 如何消除此错误? 问题答案: 使用或任意数量)(或简称)运行JVM

  • 这是在“Gradlew Build”期间在Android Studio中发生的。 错误:“VM初始化时发生错误,无法为3174400KB对象堆保留足够的空间”(3.18GB) 项目文件夹本身只占用1.1GB,所以我不知道这是怎么可能的。 更新:这个问题似乎已经自行解决。

  • 我已经安装了Android Studio 1.1.0。我还没有做任何事情,比如启动新的Android应用程序或导入任何东西。不知何故,它试图构建一些东西,它抛出同步错误。 错误:无法启动守护进程。此问题可能是由于守护进程配置不正确造成的。例如,使用了一个无法识别的jvm选项。请参阅http://gradle.org/docs/2.2.1/userguide/gradle_daemon.html中关

  • 所以我不知道我点击了什么,但在我点击之后,所有的东西,就像字面上所有的东西都停止工作了。 当前错误消息: 错误:无法启动后台进程。此问题可能是后台进程配置不正确造成的。例如,使用了一个无法识别的jvm选项。请参阅https://docs.gradle.org/5.4.1/userguide/gradle_daemon.html中关于后台进程的用户手册章节:进程命令行:C:\Program File

  • 问题内容: 只是面临奇怪的问题。当我键入 我有 。 这个命令工作正常 如果我将xms,xmx更改为128m,则会再次出现错误。 使用命令,我可以看到,我有超过192 MB的空闲空间,那么为什么我仍然收到此错误? 谢谢 问题答案: 您尝试在其上运行此计算机的机器似乎只有256 MB内存。 也许JVM试图分配一个大的,连续的64 MB内存块。可用的192 MB可能会分成较小的碎片,因此不会有连续的64