title: Ionic 3 Error occurred during initialization of VM
body: <p>I am trying to deploy my freshly created Ionic 3 app (I am using 64-bit Windows 10) on my mobile but it is throwing error after running <code>ionic cordova run android --device</code>:</p>
  
  <pre><code>&gt; cordova build android
  ANDROID_HOME=D:\android-sdk\tools\bin
  JAVA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_161
  Subproject Path: CordovaLib
  Error occurred during initialization of VM
  Could not reserve enough space for 2097152KB object heap
  Error: cmd: Command failed with exit code 1
  
  [ERROR] An error occurred while running cordova build android (exit code 1).
  </code></pre>
  
  <p>I have installed Android studio. 
  I have added a system variable _ JAVA_OPTIONS with value -Xmx512M
  I have also added a system variable GRADLE_OPTS with value -Xmx2048M</p>
  
  <p>Otherwise I have:</p>
  
  <pre><code>ANDROID_HOME=D:\android-sdk\tools\bin
  JAVA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_161 
  </code></pre>
  
  <p>Why is this error still occurring?</p>