ionique android build - pas assez de mémoire pour lancer la jvm

Lorsque vous essayez de créer un android apk fichier à l'aide ionique et gradle, j'obtiens une erreur

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 http://gradle.org/docs/2
.2.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 object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.

D:\test\platforms\android\cordova\node_modules\q\q.js:126
                    throw e;
                          ^
Error code 1 for command: cmd with args: /s /c "D:\test\platforms\android\gradle
w cdvBuildDebug -b D:\test\platforms\android\build.gradle -Dorg.gradle.daemon=tr
ue"
ERROR building one of the platforms: Error: D:\test\platforms\android\cordova\bu
ild.bat: Command failed with exit code 1
You may not have the required environment or OS to build this project
Error: D:\test\platforms\android\cordova\build.bat: Command failed with exit cod
e 1
    at ChildProcess.whenDone (C:\Users923\AppData\Roaming\npm\node_modules\cor
dova\node_modules\cordova-lib\src\cordova\superspawn.js:131:23)
    at ChildProcess.emit (events.js:110:17)
    at maybeClose (child_process.js:1015:16)
    at Process.ChildProcess._handle.onexit (child_process.js:1087:5)

Je suis en train de le faire sur un Bureau Windows 7.
Mon Java paramètres de la mémoire est comme ci-dessous.

D:\test>java -XX:+PrintFlagsFinal -version | findstr /i "HeapSize PermSize Threa
dStackSize"
     intx CompilerThreadStackSize                   = 0               {pd produc
t}
    uintx ErgoHeapSizeLimit                         = 0               {product}
    uintx HeapSizePerGCThread                       = 87241520        {product}
    uintx InitialHeapSize                          := 67108864        {product}
    uintx LargePageHeapSizeThreshold                = 134217728       {product}
    uintx MaxHeapSize                              := 1044381696      {product}
     intx ThreadStackSize                           = 0               {pd produc
t}
     intx VMThreadStackSize                         = 0               {pd produc
t}
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)

J'ai essayé de réglage -Xms et -Xmx à de nombreux endroits, mais le système est tout simplement pas en mesure de le faire démarrer. Comment puis-je résoudre ce problème?

J'ai changé le

Ajouté JAVA_OPTS dans Mon Ordinateur > Propriétés > Environment Variables
Ajouté JAVA_OPTS dans dx.bat dans android SDK
Ajouté JAVA_OPTS dans build.bat à l'intérieur du dossier de l'application
Changé JAVA_OPTS dans gradle.properties

S'il vous plaît aider

Êtes-vous sur une version 64 bits de Windows? Si c'est le cas, vous devriez vérifier si vous avez jdk 64 bits.
Pour les gars à la recherche à la résolution de ce problème, cela m'a aidé - stackoverflow.com/a/34636929/3748701

OriginalL'auteur aksappy | 2015-05-20