cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-14139) Can't run android commands with 32bit Java
Date Sat, 30 Jun 2018 11:47:00 GMT

    [ https://issues.apache.org/jira/browse/CB-14139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16528663#comment-16528663
] 

ASF GitHub Bot commented on CB-14139:
-------------------------------------

raphinesse closed pull request #459: CB-14139 android: Add jvmargs flag for custom values
URL: https://github.com/apache/cordova-android/pull/459
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/bin/templates/cordova/lib/build.js b/bin/templates/cordova/lib/build.js
index e33cfae08..fb1d54dbe 100644
--- a/bin/templates/cordova/lib/build.js
+++ b/bin/templates/cordova/lib/build.js
@@ -53,6 +53,7 @@ function parseOpts (options, resolvedTarget, projectRoot) {
         buildMethod: process.env.ANDROID_BUILD || 'studio',
         prepEnv: options.argv.prepenv,
         arch: resolvedTarget && resolvedTarget.arch,
+        jvmargs: (options.argv.jvmargs || '-Xmx2048m'),
         extraArgs: []
     };
 
diff --git a/bin/templates/cordova/lib/builders/GradleBuilder.js b/bin/templates/cordova/lib/builders/GradleBuilder.js
index cec20791b..fb464f714 100644
--- a/bin/templates/cordova/lib/builders/GradleBuilder.js
+++ b/bin/templates/cordova/lib/builders/GradleBuilder.js
@@ -57,7 +57,7 @@ GradleBuilder.prototype.getArgs = function (cmd, opts) {
     // 10 seconds -> 6 seconds
     args.push('-Dorg.gradle.daemon=true');
     // to allow dex in process
-    args.push('-Dorg.gradle.jvmargs=-Xmx2048m');
+    args.push('-Dorg.gradle.jvmargs=' + opts.jvmargs);
     // allow NDK to be used - required by Gradle 1.5 plugin
     args.push('-Pandroid.useDeprecatedNdk=true');
     args.push.apply(args, opts.extraArgs);
diff --git a/bin/templates/cordova/lib/builders/StudioBuilder.js b/bin/templates/cordova/lib/builders/StudioBuilder.js
index 81d9240f9..4cf81f493 100644
--- a/bin/templates/cordova/lib/builders/StudioBuilder.js
+++ b/bin/templates/cordova/lib/builders/StudioBuilder.js
@@ -57,7 +57,7 @@ StudioBuilder.prototype.getArgs = function (cmd, opts) {
     // 10 seconds -> 6 seconds
     args.push('-Dorg.gradle.daemon=true');
     // to allow dex in process
-    args.push('-Dorg.gradle.jvmargs=-Xmx2048m');
+    args.push('-Dorg.gradle.jvmargs=' + opts.jvmargs);
     // allow NDK to be used - required by Gradle 1.5 plugin
     // args.push('-Pandroid.useDeprecatedNdk=true');
     args.push.apply(args, opts.extraArgs);


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Can't run android commands with 32bit Java
> ------------------------------------------
>
>                 Key: CB-14139
>                 URL: https://issues.apache.org/jira/browse/CB-14139
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-android
>    Affects Versions: 8.0.0
>         Environment: Win 10 Pro x64
>            Reporter: misterTi
>            Assignee: Joe Bowser
>            Priority: Blocker
>
> GradleBuilder.js has a buiit-in option org.gradle.jvmargs=---Xmx2048m on line 59, which
prevents it from running on 32bit Java. It always fails with VM heap error. The workaround
is to create an environment variable __JAVA__OPTIONS=-Xmx512m, but this then affects the whole
system.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message