Ionic - Build Failed - Unable to start the daemon process - java

I created an app with Ionic but when trying to build it I get this error:
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 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:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Error: cmd: Command failed with exit code 1 Error output:
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 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:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
What is it that I am doing wrong? How can I change those settings?

Just for anyone who has been having this same problem. I encountered it too and solved it the following way.
I changed the argument
'org.gradle.jvmargs': '-Xmx2048m',
to:
'org.gradle.jvmargs': '-Xmx1024m',
in the constructor of GradlePropertiesParser class. This can be find on line 37 of GradlePropertiesParser.js at:
platforms/android/cordova/lib/config
The result was successful for me.

Related

I was trying to release an app with android studio but it gave me this error can you help me?

Task :app:mergeReleaseResources FAILED
Execution failed for task ':app:mergeReleaseResources'.
A failure occurred while executing com.android.build.gradle.internal.res.ResourceCompilerRunnable
Resource compilation failed (Failed to compile values resource file C:\Users\STEFANO\Desktop\Delia\app\build\intermediates\incremental\release\mergeReleaseResources\merged.dir\values\values.xml. Cause: java.lang.IllegalStateException: Can not extract resource from com.android.aaptcompiler.ParsedResource#4e767cf8.). Check logs for more details.
Try:
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Can not extract resource from com.android.aaptcompiler.ParsedResource#4e767cf8.
you must check your values/xml (string, style, colors...) for typos like:
Symbol ' escape as \'
Check the colors start with #

nativescript-ng2-carousel error after installing when run tns build android

I am making a nativescript app and want to add a carousel by using nativescript-ng2-carousel but after I did npm i nativescript-ng2-carousel I get an error saying
Warning: there already is an extend called com.tns.NativeScriptActivity.
Warning: there already is an extend called com.tns.FragmentClass.
Exception in thread "main" java.io.IOException: File already exists. This may lead to undesired behavior.
Please change the name of one of the extended classes.
File:D:\Documents\coursera_examples\nativescript\VilcabambaHotel\platforms\android\app\src\main\java\com\tns\gen\java\lang\Object_button_19_32_ClickListenerImpl.java Class:
at org.nativescript.staticbindinggenerator.Generator.writeBindings(Generator.java:81)
at org.nativescript.staticbindinggenerator.Main.main(Main.java:47)
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:runSbg'.
Process 'command 'C:\Program Files\Android\Android Studio\jre\bin\java.exe'' finished with non-zero exit value 1
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 10s
Command gradlew.bat failed with exit code 1
I have tried updating my typescript, I have deleted node_modules and reinstalled, I have removed and added platforms and still get the same error

FAILURE Build failed with an exception

how to solve this?
command ionic cordova build 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 https://docs.gradle.org/ 4.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
Set the JAVA_OPTS system variable (-Xmszzzm -minimum , -Xmxzzzm - maximum)
JAVA_OPTS="-Xms128m -Xmx512m"
(set as per requirement)
...hope this will help you

Gradle Android Studio

Hi i have a problem i see this in my android studio:
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 http://gradle.org/docs/2.2.1/userguide/gradle_daemon.html
Please read the following process output to find out more:
----------------------- 23:57:48.187 [main] DEBUG o.g.l.daemon.bootstrap.DaemonMain - Assuming the daemon was started
with following jvm opts: [-XX:MaxPermSize=256m,
-XX:+HeapDumpOnOutOfMemoryError, -Xmx1256m, -Dfile.encoding=UTF-8, -Duser.country=SV, -Duser.language=es, -Duser.variant]
FAILURE: Build failed with an exception.
What went wrong: Could not create service of type DaemonContext using DaemonServices.createDaemonContext().
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Navigate to Android Studio->Settings->Compiler->VM Options and set -Xmx512m
Reason for this issue could be: Grade's build daemon ( forked process ) is invoked with maximum Java heap size as platform default value in your case 1256MB
For more information check this thread

Bootrun error when trying to run grails

I was setting up to run graddle from my terminal using "grails dev run-app" command, then an error occurred.
I'm not sure what causing the error, but what I have installed are:
Java JDK 1.8.0_111
Grails 3.0.14
MySQL
I have tried to use "grails clean" and try to use "export=JAVA_HOME='/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home'" but still outputs the same error.
This is the simplified long error:
Running application...
objc[3493]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.
Configuring Spring Security Core ...
... finished configuring Spring Security Core
ERROR org.apache.tomcat.jdbc.pool.ConnectionPool - Unable to create initial connections of pool.
java.sql.SQLException: Access denied for user 'mobileeyeclinic'#'localhost' (using password: YES)
...
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':bootRun'.
Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
| Error Failed to start server (Use --stacktrace to see the full trace)
Deeply thanks for anyone who could provide a solution to this matter.
The warning message Running application... Which one is undefined is not matter. I think your failure cause by wrong password for 'mobileeyeclinic'#'localhost' or may be the MySQL is not running as a service. See this link Class JavaLaunchHelper is implemented in both. One of the two will be used. Which one is undefined for more info
ERROR org.apache.tomcat.jdbc.pool.ConnectionPool - Unable to create
initial connections of pool.
java.sql.SQLException: Access denied for user
'mobileeyeclinic'#'localhost' (using password: YES)
You have no rights to access to the bbdd you have set on the application.yml file.

Categories