Error while building on IONIC 3

Asked

Viewed 363 times

0

I am coding an application in IONIC 3 and while trying to perform the command ionic cordova run android (In order to be able to debug the application in my cell 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 have Android Studio installed, and while trying to perform a device debug for it the application is started normally... The problem is in some configuration of the same Ionic environment... Would anyone know where I’m going wrong?

  • I’m having the same problem, but I’ve come up with an alternative solution. Import the project into Android Studio (you have to import the build.Radle, or Settings.Radle) and start the app there. But the app, at least in my case, does not respond very well. I hope to have helped

1 answer

1

Browser other questions tagged

You are not signed in. Login or sign up in order to post.