Error to generate APK in IONIC 3

Asked

Viewed 562 times

0

The problem only occurs at 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 diario 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 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/ 4.1/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

1 answer

1

John, Your problem seems to be related to this explanation here: https://stackoverflow.com/questions/171205/java-maximum-memory-on-windows-xp/497757#497757 The JVM is unable to allocate 2gb (2097152KB Object heap) of contiguous memory, checks if your computer has this memory available. One tip that the link person gives is to migrate to windows 64bits, because it works with a virtual memory with much more space, and then the JVM will be able to allocate this memory.

  • Actually, my computer is windows 64x but Java is 86x, maybe this is what is causing this problem. Thank you!

Browser other questions tagged

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