title: cordova compile android exit code 1 platforms\android\cordova\node_modules\q\q.js through e;
body: <p>I have tried to create the test Android application through Apache Cordova in my Windows 8.1 machine. When at the time of compile/build, I'm getting the following error message.</p>
  
  <blockquote>
    <p>E:\workspace\test4>cordova compile android --stacktrace Running
    command: cmd "/s /c
    "E:\workspace\test4\platforms\android\cordova\build.bat""
    ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk
    JAVA_HOME=C:\Program Files (x86)\Java\jdk1.7.0_79 Running:
    E:\workspace\test4\platforms\android\gradlew cdvBuildDebug -b
    E:\workspace\test4\platforms\android\build.gradle
    -Dorg.gradle.daemon=true Picked up _JAVA_OPTIONS: -Xmx1024m</p>
    
    <p>FAILURE: Build failed with an exception.</p>
    
    <ul>
    <li><p>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
    <a href="http://gradle.org/docs/2.2.1/userguide/gradle_daemon.html" rel="nofollow">http://gradle.org/docs/2.2.1/userguide/gradle_daemon.html</a> 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. Picked up _JAVA_OPTIONS: -Xmx1024m</p></li>
    <li><p>Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.</p></li>
    </ul>
    
    <p>E:\workspace\test4\platforms\android\cordova\node_modules\q\q.js:126
                        throw e;
                              ^ Error code 1 for command: cmd with args: /s /c "E:\workspace\test4\platforms\android\gradlew cdvBuildDebug -b
    E:\workspace\test4\platforms\android\build.gradle
    -Dorg.gradle.daemon=true" ERROR building one of the platforms: Error: cmd: Command failed with exit code 1 You may not have the required
    environment or OS to build this project Error: cmd: Command failed
    with exit code 1
        at ChildProcess.whenDone (C:\Users\rajanipriya\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:134: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)</p>
  </blockquote>
  
  <hr>
  
  <p>Below are the system variables I set:</p>
  
  <blockquote>
    <p>ANDROID_HOME - C:\Program Files (x86)\Android\android-sdk     ANT_HOME
    - E:\Android\Ant\apache-ant-1.9.6-bin\apache-ant-1.9.6    JAVA_HOME - C:\Program Files (x86)\Java\jdk1.7.0_79</p>
  </blockquote>
  
  <p>For the 'PATH'system variables:</p>
  
  <blockquote>
    <p>E:\workspace\nodejs\;    C:\Program Files (x86)\Java\jdk1.7.0_79\bin<br>
    E:\Android\Ant\apache-ant-1.9.6-bin\apache-ant-1.9.6\bin;<br>
    C:\Program Files (x86)\Android\android-sdk\platform-tools;<br>
    C:\Program Files (x86)\Android\android-sdk\tools</p>
  </blockquote>
  
  <hr>
  
  <p>I even installed the emulator from <code>'Android sdk'(extras)</code></p>