首页 > 解决方案 > 我在通过 cordova build 构建 android 时遇到问题

问题描述

我在nodejs命令提示符下使用cordova build android命令构建android应用程序时遇到问题,每当我输入“cordova build”时,这就是我在下面遇到的错误:

C:\Users\lovely\Desktop\hello>cordova build

Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=C:\Users\lovely\AppData\Local\Android\sdk (DEPRECATED)
Starting a Gradle Daemon (subsequent builds will be faster)

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.10.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

标签: androidcordova

解决方案


推荐阅读