Skip to content

Commit

Permalink
Updated Android cannnot start VM workaround directions
Browse files Browse the repository at this point in the history
  • Loading branch information
Chuxel committed Jul 21, 2015
1 parent 83a8312 commit db57b30
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
4 changes: 2 additions & 2 deletions known-issues/known-issues-android.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ Error A fatal exception has occurred. Program will exit.
Error C:\cordova\BlankCordovaApp2\BlankCordovaApp2\platforms\android\cordova\build.bat: Command failed with exit code 1
~~~~~~~~~~~~~

The problem is that the Ant or Gradle build systems are running out of heap memory when trying to compile your application. To resolve this problem you can follow [these instructions](http://www.tomsguide.com/faq/id-1761312/fix-create-java-virtual-machine-issue.html) to increase the heap of the JVM by setting the following environment variable:
The problem is that the Ant or Gradle build systems are running out of heap memory when trying to compile your application. To resolve this problem you can increase the heap of the JVM by setting the following environment variable:

~~~~~~~~~~~~~~~~~~~~~~
_JAVA_OPTIONS=-Xmx512M
~~~~~~~~~~~~~~~~~~~~~~

If this does not resolve the issue, you can upgrade to a 64-bit version of the JDK [from here](http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-windows-x64.exe) and update the JAVA_HOME environment variable to the new install location.
See [Tips and Workarounds](../tips-and-workarounds/android/README.md#couldnotcreatevm) for additional details.

----------
**Missing Android SDK Versions:** If you already had the Android SDK installed, you may also need to update and install the SDK for Android 4.4.2 (API level 19), Android 5.0.1 (API Level 21), or Android 5.1.1 (API Level 22) . You may need to restart Visual Studio if it is open while updating the Android SDK through the SDK Manager to be able to build for Android after the update is complete. See [Manually Installing Dependencies](https://msdn.microsoft.com/en-us/library/dn757054.aspx#ThirdParty) for details.
Expand Down
14 changes: 13 additions & 1 deletion tips-and-workarounds/android/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,24 @@ Error A fatal exception has occurred. Program will exit.
Error C:\cordova\BlankCordovaApp2\BlankCordovaApp2\platforms\android\cordova\build.bat: Command failed with exit code 1
~~~~~~~~~~~~~

The problem is that the Ant or Gradle build systems are running out of heap memory when trying to compile your application. To resolve this problem you can follow [these instructions](http://www.tomsguide.com/faq/id-1761312/fix-create-java-virtual-machine-issue.html) to increase the heap of the JVM by setting the following environment variable:
The problem is that the Ant or Gradle build systems are running out of heap memory when trying to compile your application. To resolve this problem you can increase the heap of the JVM by setting the following environment variable and restarting Visual Studio:

~~~~~~~~~~~~~~~~~~~~~~
_JAVA_OPTIONS=-Xmx512M
~~~~~~~~~~~~~~~~~~~~~~

More specifically, following the instructions from [this article](http://www.tomsguide.com/faq/id-1761312/fix-create-java-virtual-machine-issue.html):

1. Open the Control Panel
2. Go to System
3. Go to Advanced Systems Properties
4. Go to Environment Variables
5. In System Variables, click Add
6. New Variable Name: _JAVA_OPTIONS
7. New Variable Value: -Xmx512M
8. Click OK
9. Now restart Visual Studio to ensure the variable is picked up

If this does not resolve the issue, you can upgrade to a 64-bit version of the JDK [from here](http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-windows-x64.exe) and update the JAVA_HOME environment variable to the new install location.

## More Information
Expand Down

0 comments on commit db57b30

Please sign in to comment.