Error to generate the APK in IONIC 3

0

The problem only occurs when the command:

$ Ionic cordova build android
  

cordova build android.

     

Android Studio project detected

     

[10:58:09] lint finished in 4.20 s   ANDROID_HOME = C: \ Users \ Journal \ AppData \ Local \ Android \ Sdk

     

JAVA_HOME = C: \ Program Files (x86) \ java \ jdk1.8.0_161   studio   Subproject Path: CordovaLib   Subproject Path: app   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 an incorrect configuration of the daemon.   For example, an unrecognized jvm option is used.   Please refer to the user guide chapter on the daemon at link   4.1 / userguide / gradle_daemon.html      

    Please read the following process to find out more:

  •   

Error occurred during initialization of VM   Could not book enough space for 2097152KB object heap

    
asked by anonymous 19.01.2018 / 18:37

1 answer

1

John, Your problem seems to be related to this explanation here: link The JVM is not able to allocate 2gb (2097152KB object heap) of contiguous memory, verifies that your computer has this available memory. One tip that the linker gives is to migrate to windows 64bits because it works with a virtual memory with a lot more space, and then the JVM will be able to allocate that memory.

    
19.01.2018 / 19:00