title: Error: Could not create the Java Virtual Machine: Android Studio
body: <p>Actually I configured one Android project in android studio, this project was originally created by my colleague in his machine (Windows-7, 64-bit, jdk 1.8), my machine also has same configuration (i.e. Windows-7, 64-bit, jdk 1.8) but if I tried to run this project, it gives me the above error at run time. Please see the below screen shot for more information--</p>
  
  <p><a href="https://i.stack.imgur.com/1CBKO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1CBKO.png" alt="enter image description here"></a></p>
  
  <p>Solutions I tried so far are---</p>
  
  <pre><code>1]  try to add something like this to your gradle.properties file in the project:
  org.gradle.jvmargs=-Xmx512m -XX:MaxPermSize=512m
  
  2] Changed below file to modify vm heap option.
  C:\Program Files\Android\android-studio\bin\studio.exe.vmoptions
  I increased -Xms128m to -Xms512m and restarted Android Studio.
  
  3] Tried creating a new environment variable named _JAVA_OPTIONS, set it to
  -Xms256m -Xmx1024m.
  
  4] File -&gt; Settings -&gt; Compiler (Gradle-based Android Projects)
  Change the "**VM options**" to
  -Xmx512m -XX:MaxPermSize=512m
  
   5] go to environment variables
      in system variables add :
      New Variable Name: _JAVA_OPTIONS
      New Variable Value: -Xmx512M
      Restart Android studio
  **but in this case didn't found any "VM options" option in Compiler option**
  </code></pre>
  
  <p>But none of above solutions worked for me, so any help will be really appreciated. Also let me know if I can provide more information for the same. Thank you. </p>