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

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 :

    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
    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?

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

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