Skip to content

Commit

Permalink
Merge pull request #13 from Chuxel/master
Browse files Browse the repository at this point in the history
Updated Android heap known issue
  • Loading branch information
Chuxel committed Jul 21, 2015
2 parents 44af29c + a4e9f6b commit 1ff65d2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 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 and restarting Visual Studio:

~~~~~~~~~~~~~~~~~~~~~~
_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
2 changes: 1 addition & 1 deletion known-issues/known-issues-general.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Remove these files from source control if you are not checking in the "platforms
2. Update to Cordova 5.1.1 via the config designer (Platforms > Cordova CLI)

3. Re-add your plugin via "Plugins" tab in the config.xml designer

----------
**Slow first build or first plugin add:** The first build or plugin add for a given version of Cordova will be slower than subsequent builds as VS must first dynamically acquire Cordova. See the Output Window for more detail on progress. Further, the first remote iOS build will exhibit the same behavior as the agent downloads Cordova on your OSX machine. If you encounter a CordovaModuleLoadError with the first iOS build for a given Cordova version you can follow [these instructions](../tips-and-workarounds/ios/README.md#npm-cache) to resolve the problem.

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
1 change: 0 additions & 1 deletion tutorial-team-build/TFS2015.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ Follow these instructions if you encounter an error about Ant not being in the p

You are now ready to go in VSO!


## More Information
* [Learn about other Team Build / CI options](./README.md)
* [Read tutorials and learn about tips, tricks, and known issues](../Readme.md)
Expand Down

0 comments on commit 1ff65d2

Please sign in to comment.