在使用cmd在Cordova中进行构建时 [英] While making build in Cordova using cmd

查看:142
本文介绍了在使用cmd在Cordova中进行构建时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用cdm使用Cordova进行构建时,正在发送此错误

While making build using Cordova by cdm it is sending this error

**为此构建开始新的Gradle守护进程(后续构建会更快).

**Starting a new Gradle Daemon for this build (subsequent builds will be faster).

失败:构建失败,并出现异常.

FAILURE: Build failed with an exception.

  • 出了什么问题: 无法启动守护进程. 此问题可能是由守护程序的错误配置引起的. 例如,使用无法识别的jvm选项. 请参阅守护程序上的用户指南一章,网址为 https://docs.gradle.org/ 2.14.1/userguide/gradle_daemon.html

    请阅读以下过程输出以了解更多信息:

  • 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/ 2.14.1/userguide/gradle_daemon.html

    Please read the following process output to find out more:

VM初始化期间发生错误 无法为2097152KB对象堆保留足够的空间

Error occurred during initialization of VM Could not reserve enough space for 2097152KB object heap

  • 尝试: 使用--stacktrace选项运行以获取堆栈跟踪.使用--info或--debug运行 选项以获取更多日志输出. 错误:cmd:命令失败,退出代码为1错误输出: 失败:构建失败,并出现异常.

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Error: cmd: Command failed with exit code 1 Error output: FAILURE: Build failed with an exception.

出了什么问题: 无法启动守护进程. 此问题可能是由守护程序的错误配置引起的. 例如,使用无法识别的jvm选项. 请参阅守护程序上的用户指南一章,网址为 https://docs.gradle.org/ 2.14.1/userguide/gradle_daemon.html

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/ 2.14.1/userguide/gradle_daemon.html

VM初始化期间发生错误 无法为2097152KB对象堆保留足够的空间

Error occurred during initialization of VM Could not reserve enough space for 2097152KB object heap

  • 尝试: 使用--stacktrace选项运行以获取堆栈跟踪.使用--info或--debug运行 选项以获取更多日志输出. **
  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. **

请提出解决方案.

谢谢

推荐答案

从Cordova 6.2.0升级到Cordova 6.4.0后,遇到类似问题.通过在环境变量下可用的系统变量中添加值为 -Xmx512M _JAVA_OPTIONS 变量来解决该问题.

Faced similar issue after upgrading to Cordova 6.4.0 from Cordova 6.2.0. Managed to resolve it by adding _JAVA_OPTIONS variable with value -Xmx512M in system variables available under environment variables.

屏幕截图如下:

希望它会有所帮助.干杯.

Hope it helps. Cheers.

这篇关于在使用cmd在Cordova中进行构建时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆