Error building on IONIC 3

0

I am coding an application in IONIC 3 and trying to execute the command ionic cordova run android (To be able to debug the application on my phone) the following error occurs:

Running app-scripts build: --address 0.0.0.0 --port 8100 --p 8100 --livereload-port 35729 --r 35729 --iscordovaserve --externalIpRequired --nobrowser

[18:28:12]  build dev started ... 
[18:28:12]  clean started ... 
[18:28:12]  clean finished in 15 ms 
[18:28:12]  copy started ... 
[18:28:12]  transpile started ... 
[18:28:15]  transpile finished in 2.74 s 
[18:28:15]  preprocess started ... 
[18:28:15]  deeplinks started ... 
[18:28:15]  deeplinks finished in 62 ms 
[18:28:15]  preprocess finished in 62 ms 
[18:28:15]  webpack started ... 
[18:28:15]  copy finished in 3.33 s 
[18:28:25]  webpack finished in 10.26 s 
[18:28:25]  sass started ... 
[18:28:27]  sass finished in 1.94 s 
[18:28:27]  postprocess started ... 
[18:28:27]  postprocess finished in less than 1 ms 
[18:28:27]  lint started ... 
[18:28:27]  build dev finished in 15.06 s 
[2K[G> cordova run android
[2K[GANDROID_HOME=C:\Android
[2K[GJAVA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_144
[2K[GSubproject Path: CordovaLib
[18:28:32]  lint finished in 5.52 s 
[2K[GStarting a Gradle Daemon (subsequent builds will be faster)
[2K[G
[2K[GFAILURE: 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
[2K[GCould not reserve enough space for 2097152KB object heap
[2K[G
[2K[G
[2K[G
[2K[G* Try:
[2K[G
[2K[GRun with --stacktrace option to get the stack trace. Run with --info
[2K[G or --debug option to get more log output.
[2K[GError: 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/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


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
[2K[G
[2K[G
[2K[G[ERROR] Cordova encountered an error.
        You may get more insight by running the Cordova command above directly.

[2K[G[ERROR] An error occurred while running cordova run android (exit code 1).

I'm with Android Studio installed, and when trying to perform a debug on device by it the application is started normally ... The problem is in some configuration of the same ionic environment ... Could anyone tell me where I'm going wrong?

    
asked by anonymous 05.08.2017 / 23:32

1 answer

1

One solution to this problem would be to increase the memory of it, you can do this by adding a new environment variable _JAVA_OPTIONS with the value -Xmx512M .

Another alternative is to set the% w / o% x64 version of Java.

References:

link link

    
10.01.2018 / 20:45