Error on Ionic build Android? - ionic-framework

i am working on a ionic application. I am getting an error while trying to build for android.
FAILURE: Build failed with an exception.
* What went wrong:
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 http://gradle.org/docs/2.2.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 object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Error occurred during initialization of VM
Could not reserve enough space for object heap
From the message, seems it is caused by the JVM heap space when build the ionic project with gradle, please try to increase heap size in Java
The simple steps for windows system:
Config the GRADLE_OPTS or JAVA_OPTS in your local environment with following parameters
-Xms512m -Xmx512m -XX:PermSize=256m -XX:MaxPermSize=512m
(If you are using JDK8, the PermSize will be ignored.)
Ref
Configuring the build environment

Related

Error when trying to launch the uiautomatorviewer

I'm trying to launch the uiautomatorviewer to inspect elements on my mobile device, but when I execute it into the command line, the system returns the message below:
-Djava.ext.dirs=..\lib\x86_64;..\lib is not supported. Use -classpath instead.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit
Looks like some version problem, but I don't know how to resolve it.
Any ideas?

how i can solve this problem in flutter application

Launching lib\main.dart on SM A105F in debug mode...
Running Gradle task 'assembleDebug'...
√ Built build\app\outputs\flutter-apk\app-debug.apk.
Installing build\app\outputs\flutter-apk\app.apk...
Error: ADB exited with exit code 1
Performing Streamed Install
adb: failed to install C:\Users\ABDERRAHIM\flutter-1\bouzid_app\build\app\outputs\flutter-apk\app.apk:
Exception occurred while executing:
android.os.ParcelableException: java.io.IOException: Requested internal only, but not enough space
at android.util.ExceptionUtils.wrap(ExceptionUtils.java:34)
at com.android.server.pm.PackageInstallerService.createSession(PackageInstallerService.java:564)
at com.android.server.pm.PackageManagerShellCommand.doCreateSession(PackageManagerShellCommand.java:2700)
at com.android.server.pm.PackageManagerShellCommand.runInstall(PackageManagerShellCommand.java:1061)
at com
Error launching application on SM A105F.
Your error states the following java.io.IOException: Requested internal only, but not enough space at android.util.ExceptionUtils.wrap(ExceptionUtils.java:34). Do you have enough free space on your device?
Please search the web before posting a question: Flutter - android.os.ParcelableException: java.io.IOException: Requested internal only, but not enough space
According to #dariush f's answer answer:
Maybe your device/emulator's storage is full. Try deleting some apps or similar to free up storage.
Or
Invalid package name . for example using capital letter in package name. use this to change package name in flutter

Unrecognized option: -Xcext.enabled=true ERROR JVM, JRuby, Scala, and RubyMine

The error being related to something from when JRuby was installed does seam to make sense. When installing JRuby with RVM it had a dependency it needed to compile which I believe didn't go so well. Which dependency I don't quite remember. It seams to pertain to the JVM and -Xcext.
Scala:
~$ scala
Unrecognized option: -Xcext.enabled=true
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
No Google search results on this.
I have tried the latest from http://www.scala-lang.org version 2.11.1 and got this exact error.
Java Version:
java version "1.7.0_55"
OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-2.4.7-1ubuntu1)
OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)
JRuby:
Trying to re-install JRuby via RVM didn't ask to build any dependencies. So I'll have to look up the -Xcext case online and figure it out. ... I can't seem to find what it was that had problems.
~$ irb
Unrecognized option: -Xcext.enabled=true
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
And it affects RubyMine. I really want to know where this problem has embedded itself into as it's causing quite a few headaches!
Installing JRuby-head
~/.rvm$ rvm install jruby-head
Checking requirements for ubuntu.
Requirements installation successful.
$JAVA_HOME was empty, setting up JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/jre, if it fails try setting JAVA_HOME to something sane and try again.
Cloning from git://github.com/jruby/jruby.git, this may take a while depending on your connection.
HEAD is now at dc4248b Minor cleanup.
From git://github.com/jruby/jruby
* branch master -> FETCH_HEAD
Already up-to-date.
Copying from repo to src path...
jruby-head - #mvn....................................................................................................................................
jruby-head - #installing to /home/user/.rvm/rubies/jruby-head.
jruby-head - #making binaries executable......
jruby-head - #downloading rubygems-2.2.2
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 404k 100 404k 0 0 1465k 0 --:--:-- --:--:-- --:--:-- 1470k
jruby-head - #extracting rubygems-2.2.2....
jruby-head - #removing old rubygems.........
jruby-head - #installing rubygems-2.2.2.
Error running 'env GEM_HOME=/home/user/.rvm/gems/jruby-head#global GEM_PATH= /home/user/.rvm/rubies/jruby-head/bin/ruby -d /home/user/.rvm/src/rubygems-2.2.2/setup.rb',
showing last 15 lines of /home/user/.rvm/log/1405475737_jruby-head/rubygems.install.log
[2014-07-15 22:00:00] /home/user/.rvm/rubies/jruby-head/bin/ruby
current path: /home/user/.rvm/src/rubygems-2.2.2
GEM_HOME=/home/user/.rvm/gems/jruby-1.7.13
PATH=/home/user/.rvm/gems/jruby-1.7.13/bin:/home/user/.rvm/gems/jruby-1.7.13#global/bin:/home/user/.rvm/rubies/jruby-1.7.13/bin:/home/user/.rvm/bin:/usr/local/heroku/bin:.:/home/user/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/RubyMine/bin
GEM_PATH=/home/user/.rvm/gems/jruby-1.7.13:/home/user/.rvm/gems/jruby-1.7.13#global
command(6): env GEM_HOME=/home/user/.rvm/gems/jruby-head#global GEM_PATH= /home/user/.rvm/rubies/jruby-head/bin/ruby -d /home/user/.rvm/src/rubygems-2.2.2/setup.rb
Unrecognized option: -Xcext.enabled=true
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Gemset '' does not exist, 'rvm jruby-head do rvm gemset create ' first, or append '--create'.
Sounds like you have -Xcext.enabled=true in one of the JVM's options environment variables, such as JAVA_OPTS, _JAVA_OPTIONS, or JAVA_TOOL_OPTIONS. I assume at some point it was supposed to be added to a JRuby-specific environment variable but accidentally got put in one of those JVM ones.

gradle eclipse integration -

I'm using a eclipse 4.2 distribution and have installed the gradle eclipse integration plugin from springsource.
When I initially try to create a quick java project with the wizard I get the following 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 C:\devtools\gradle-1.4\docs\userguide\gradle_daemon.html
Please read below process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Could not fetch model of type 'HierarchicalEclipseProject' using Gradle installation 'C:\devtools\gradle-1.4'.
When I run gradle build in the command line everything's fine.
Any ideas how i could get this to work?
Cheers
Since you can run gradle in command line successfully, you would want to try to use that gradle in the eclipse plugin.
Set Preference -> Gradle -> Gradle Distribution -> Folder to your own gradle distribution that runs fine.

Installing Java on Chroot Solaris

I have recently created a chrooted environment on a Solaris 10 box. If have installed jdk 7 to this 'jail'. It is not running. When I try ./java -version, I get the following error:
guarantee(mem_serialize_page != NULL) failed: mmap Failed for memory serialize page
The log file doesn't help either. Have any of you seen this error before? I have tried Googling it but there is very little information on it.
A fatal error has been detected by the Java Runtime Environment:
Internal Error (os_solaris.cpp:4995), pid=817, tid=2
guarantee(mem_serialize_page != NULL) failed: mmap Failed for memory serialize page
JRE version: 7.0-b147
Java VM: Java HotSpot(TM) Client VM (21.0-b17 mixed mode, sharing solaris-x86 )
Core dump written. Default location: /jdk1.7.0/bin/core or core.817
Have you included links to /dev and /devices in your chroot environment? How about /proc?