when i'm running ionic build android --release
i get an error
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap
Does anyone know the fix ?
I got the solution by adding a new system variable name : _JAVA_OPTIONS and value : -Xmx512M
After changing the setting in the environment you should restart your Command Prompt CMD to update environment variables
your solution: I got the solution by adding a new system variable name : _JAVA_OPTIONS and value : -Xmx512M
Hi Amit where should I change this
Related
I'm trying to build my ionic app for android and most users have a white screen after the splashscreen. I've past the past week to try to determine where it could come but got no idea... So I'm trying to get rid of all the errors I have when building. (it still succed to build with the errors and worked on almost half phones).
First one is here :
Building for Android...
[ERROR] An error occurred while running subprocess cordova.
cordova.cmd plugin remove sentry-cordova exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
> cordova.cmd plugin remove sentry-cordova Sentry: running before_plugin_rm - set SENTRY_SKIP_WIZARD=true to skip this angular.json build.json build_android.sh build-extras.gradle CertificateSigningRequest.certSigningRequest
...
tslint.json www Uninstalling sentry-cordova from android Subproject Path: CordovaLib Subproject Path: app Uninstalling sentry-cordova from browser js-module uninstall called : plugins\sentry-cordova\dist\js\sentry-cordova.bundle.js Uninstalling sentry-cordova from ios Removing "sentry-cordova" Removing sentry-cordova from package.json doc.find is not a function
Second one is after, there is multiples lines like this :
- warning: could not determine a source map reference (Could not auto-detect referenced sourcemap for ~/1-es5.1922
I'm pretty sure I miss some informations. Don't hesitate to ask if necessary but I'm sure I forget to do something, but i'm kinda desperate now...
EDIT : Here is the begining of the script I'm using for build :
echo "Building for Android..."
#npm run android:build:prod
sentryRemove=$(ionic cordova plugin remove sentry-cordova)
echo $sentryRemove
sentryAdd=$(cordova plugin add sentry-cordova)
echo $sentryAdd
echo "successfully added the sentry. \n Performing build now."
appBuildOut=$(ionic cordova build android --prod --release --source-map)
echo $appBuildOut
BUILD_MESSAGE='BUILD SUCCESSFUL'
Thanks for your help
The first question is why are you running a plugin remove command when building your app, if I understand correctly. I would check what is calling this command because the script that is erroring before_plugin_rm should only be called when the plugin is being removed.
To get this script to just work, try running with the environment variable SENTRY_SKIP_WIZARD=true and see if the build works. I don't think the reason for the white screen is related to Sentry as the step that is failing looks to be related to source map uploading.
I ran tns run android in my Windows 10 Command prompt with administrator privelleges.
Upon execution i get this error
C:\Users\Work\tns-station\Hello>tns run android
Skipping node_modules folder! Use the syncAllFiles option to sync files from this folder.
Searching for devices...
Copying template files...
Unable to apply changes on device: 192.168.28.102:5555. Error is: Cannot read property 'startsWith' of null.
Please what is the problem.
Note: "I ran this command in my apps directory".
Might be unrelated, but I had the same error message and it turned out that my HTTPS_PROXY environment variable was incorrect (incorrectly started with an '=' in my case).
Check that the value of the proxy variables are correct.
To help narrow down the issue, run with the "--log trace" and if you are able, check the value returned by getProxyUri with the getAgent method within \node_modules\nativescript\node_modules\make-fetch-happen\agent.js
I'm working on last version of Android Studio and create Junit Test.
However I can't launch it. I always receive a Java heap space error.
I use the environment variable STUDIO_VM_OPTIONS to set the path to my vm.options file.
In this file, I put the following :
-Xmx256m
-XX:MaxHeapSize=256m
I don't understand why I receive this.
I'm on MAC machine.
Thx in advance
Error:Unable to start the daemon process.
This problem might be
caused by incorrect configuration of the daemon. For example, an
unrecognized jvm option is used. Please refer to the user guide
chapter on the daemon at
https://docs.gradle.org/2.14.1/userguide/gradle_daemon.html
Please
read the following process output to find out more:
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap
Try this:
Go to Start-> Control Panel-> System-> Advanced(tab)-> Environment Variables-> System
Variables-> New:_JAVA_OPTIONS
Variable value: -Xmx512M
Variable name: Path
Variable value: %PATH%;C:\Program Files\Java\jre8\bin;F:\JDK\bin;
Change this to your appropriate path.
I used to have the following gradle build task:
task buildWebApp(type: Exec) {
executable = Os.isFamily(Os.FAMILY_WINDOWS) ? "grunt.cmd" : "grunt"
args = ["build"]
}
This would pick the appropriate grunt command and run it with the argument "build".
This worked without any kind of issue
I've just tried this in Android Studio 0.4, using Gradle 1.9 and it's no longer working. Instead I get the following error:
Execution failed for task ':BrowserPages:buildWebApp'.
A problem occurred starting process 'command 'grunt''
Normally at this point I would debug with gradlew, but running the following command, throws no errors:
$ ./gradlew buildWebApp
I've also tried running the full task list to still not find any problems.
The way this is executed is from my main build.gradle file with this dependency
copyWebApplication.dependsOn ':BrowserPages:buildWebApp'
Anyone have any ideas?
I've tried to run executable = "node" with arg = ["-v"] and get the same error where it can't find node. Node is globally accessible on my terminal, so I can only assume that the command is being run in a different environment to the terminal. There is the option for setting the environment but I can't find any examples of how it should be used.
Try using a fully-qualified path to the grunt executable. Perhaps something in the path has changed between Android Studio/Gradle/Android Plugin versions.