我尝试为Android生成发布版本,但在命令之后:“离子cordova构建 - 释放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.
我试过了: 转到开始 - >控制面板 - >系统 - >高级(标签) - >环境变量 - >系统变量 - >新: 变量名称:_JAVA_OPTIONS 变量值:-Xmx512M GRADLE_OPTS:-Xmx2048M 而且这个:所以你必须拥有Android Api 23才能使这个命令工作。 安装Api 23和extra后,Daemon进程的错误将得到解决 构建工具和运行命令 我已经加载 jdk / jre(64位)的最新版本 我尝试使用创建一个gradle.properties:org.gradle.jvmargs = -Xmx1024m -XX:MaxPermSize = 256m 但是这个例外仍然存在。请帮忙