Error during ionic cordova build android --prod --release


#1

Trying to build an android version of my application and ran ionic cordova build android --prod --release. However, I get this error and I don’t know how to address it :

    ANDROID_HOME=C:\Users\Sidharthramanan\AppData\Local\Android\sdk
    JAVA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_121
    Subproject Path: CordovaLib
    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/3.3/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

Can somebody please help?


#2

Search for the error message in the forum. This was talked about before.


#3

I can’t seem to find it :frowning: I only found threads which talked about different errors when running the command