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 Manual chapter on the daemon at https://docs.gradle.org/5.6.2/userguide/gradle_daemon.html
Process command line: C:\Program Files (x86)\Java\jdk1.8.0_231\bin\java.exe -Xmx1536M -Dfile.encoding=windows-1252 -Duser.country=IN -Duser.language=en -Duser.variant -cp C:\Users\Thashreef.gradle\wrapper\dists\gradle-5.6.2-all\9st6wgf78h16so49nn74lgtbb\gradle-5.6.2\lib\gradle-launcher-5.6.2.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 5.6.2
Please read the following process output to find out more:
Error occurred during initialization of VM
Could not reserve enough space for 1572864KB object heap
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
Finished with error: Gradle task assembleDebug failed with exit code 1
I suspect that your Java environment is causing the incompatibility of Android studio, please open the project settings in your AS and set its Java environment to the Jdk that comes with AS
Related
I am trying to install an AUR package in arch linux.
I get the following problem, I think it's a permissions problem.
Starting a Gradle Daemon (subsequent builds will be faster)
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 Manual chapter on the daemon at https://docs.gradle.org/5.6.4/userguide/gradle_daemon.html
Process command line: /usr/lib/jvm/java-11-openjdk/bin/java --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.invoke=ALL-UNNAMED --add-opens java.prefs/java.util.prefs=ALL-UNNAMED -XX:MaxMetaspaceSize=256m -XX:+HeapDumpOnOutOfMemoryError -Xms256m -Xmx512m -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -cp /home/user/.gradle/wrapper/dists/gradle-5.6.4-all/ankdp27end7byghfw1q2sw75f/gradle-5.6.4/lib/gradle-launcher-5.6.4.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 5.6.4
Please read the following process output to find out more:
-----------------------
FAILURE: Build failed with an exception.
* What went wrong:
Could not create service of type ClassLoaderRegistry using GlobalScopeServices.createClassLoaderRegistry().
* 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
* 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
==> ERROR: A failure occurred in build().
Aborting...
I tried:
sudo chmod -R 750 ~/.gradle
without success
rm -rf ~./gradle
fixed it for me
I am trying to run the Google Cardboard sample by following their guide: https://developers.google.com/cardboard/develop/c/quickstart
However, I run into the same error mentioned in this guide. Their solution was:
You should click the "assemble" option under ":sdk", not the one under ":hellocardboard-android".
As shown below:
The following is the image of my window. I don't have the :hellocardboard-android or :sdk folders, just Tasks.
So, is this the right assemble to be running? I am not sure how to see the other folders mentioned. If you have any clarifying questions let me know!
My full error:
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':hellocardboard-android:externalNativeBuildDebug'.
Build command failed.
Error while executing process C:\Users\Jonah\AppData\Local\Android\Sdk\cmake\3.10.2.4988404\bin\ninja.exe with arguments {-C O:\Dordt University Campus\hellocardboard-android.cxx\cmake\debug\armeabi-v7a cardboard_jni}
ninja: Entering directory `O:\Dordt University Campus\hellocardboard-android.cxx\cmake\debug\armeabi-v7a'
ninja: error: '../../../../libraries/jni/armeabi-v7a/libcardboard_api.so', needed by '../../../../build/intermediates/cmake/debug/obj/armeabi-v7a/libcardboard_jni.so', missing and no known rule to make it
It appears the problem had to do with the path having spaces, moving the project caused the proper folders to appear in the Gradle window.
After running
./gradlew bintrayUpload
I am getting the following error.
:my-library:bintrayUpload FAILED
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':my-library:bintrayUpload'.
Could not sign version '0.8.1': HTTP/1.1 400 Bad Request [message:Private key is required, please supply it by using a JSON
body or alternatively you can stored in your Bintray profile]
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
It had been working previously when I installed GPG authentication as described in this tutorial.
However, when I tried to update the version (as described here) it stopped working.
I was able to solve this issue by deleting the GPG key in Bintray and then regenerating the keys.
This happens mostly after the local.properties file is regenerated.
Instead of generating a new key, if you still remember the password, in your local.propreties file just add this line:
bintray.gpg.password= yourpassowrd
So my gradle build file is working in Windows fine and all tests are passing. Now I am trying to get all my tests to pass in linux as well.
The following is a link to the repo: https://github.com/quinnliu/WalnutiQ
I first install gradle with the following instructions:
unix> wget http://services.gradle.org/distributions/gradle-1.10-bin.zip
unix> sudo unzip -q gradle-1.10-bin.zip -d /usr/local/
unix> echo "export GRADLE_HOME=/usr/local/gradle-1.10" >> .profile
unix> echo "export PATH=$PATH:$GRADLE_HOME/bin" >> .profile
Then I navigate into the WalnutiQ folder after git cloning it.
After typing to the command line "gradle build --stacktrace" I get the following error:
[ubuntu#ip-172-31-25-10:~/Desktop/WalnutiQ]$gradle build --stacktrace :compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:jar UP-TO-DATE
:assemble UP-TO-DATE
:compileTestJava UP-TO-DATE
:processTestResources UP-TO-DATE
:testClasses UP-TO-DATE
:test
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':test'.
Cause: Could not generate test report to '/home/ubuntu/Desktop/WalnutiQ/build/reports/tests'.
Cause: java.lang.NullPointerException (no error message)
* Try:
Run with --info or --debug option to get more log output.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':test'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:71)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:48)
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:34)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:55)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:57)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:41)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:51)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:42)
at org.gradle.api.internal.AbstractTask.execute(AbstractTask.java:237)
at org.gradle.execution.DefaultTaskGraphExecuter.executeTask(DefaultTaskGraphExecuter.java:167)
at org.gradle.execution.DefaultTaskGraphExecuter.doExecute(DefaultTaskGraphExecuter.java:160)
at org.gradle.execution.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:78)
at org.gradle.execution.TaskNameResolvingBuildExecuter.execute(TaskNameResolvingBuildExecuter.java:113)
at org.gradle.execution.DelegatingBuildExecuter.execute(DelegatingBuildExecuter.java:54)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:158)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:112)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:80)
at org.gradle.launcher.RunBuildAction.execute(RunBuildAction.java:41)
at org.gradle.launcher.RunBuildAction.execute(RunBuildAction.java:27)
at org.gradle.launcher.ExceptionReportingAction.execute(ExceptionReportingAction.java:32)
at org.gradle.launcher.ExceptionReportingAction.execute(ExceptionReportingAction.java:21)
at org.gradle.launcher.CommandLineActionFactory$WithLoggingAction.execute(CommandLineActionFactory.java:219)
at org.gradle.launcher.CommandLineActionFactory$WithLoggingAction.execute(CommandLineActionFactory.java:203)
at org.gradle.launcher.Main.execute(Main.java:55)
at org.gradle.launcher.Main.main(Main.java:40)
at org.gradle.launcher.ProcessBootstrap.runNoExit(ProcessBootstrap.java:46)
at org.gradle.launcher.ProcessBootstrap.run(ProcessBootstrap.java:28)
at org.gradle.launcher.GradleMain.main(GradleMain.java:24)
Caused by: org.gradle.api.GradleException: Could not generate test report to '/home/ubuntu/Desktop/WalnutiQ/build/reports/tests'.
at org.gradle.api.internal.tasks.testing.junit.report.DefaultTestReport.generateFiles(DefaultTestReport.java:125)
at org.gradle.api.internal.tasks.testing.junit.report.DefaultTestReport.generateReport(DefaultTestReport.java:51)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestFramework.report(JUnitTestFramework.java:71)
at org.gradle.api.tasks.testing.Test.executeTests(Test.java:334)
at org.gradle.api.internal.BeanDynamicObject.invokeMethod(BeanDynamicObject.java:158)
at org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:93)
at org.gradle.api.tasks.testing.Test_Decorated.invokeMethod(Unknown Source)
at org.gradle.util.ReflectionUtil.invoke(ReflectionUtil.groovy:23)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$2.execute(AnnotationProcessingTaskFactory.java:129)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$2.execute(AnnotationProcessingTaskFactory.java:127)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:63)
... 28 more
Caused by: java.lang.NullPointerException
at org.gradle.api.internal.tasks.testing.junit.report.DefaultTestReport.copyResource(DefaultTestReport.java:168)
at org.gradle.api.internal.tasks.testing.junit.report.DefaultTestReport.copyResources(DefaultTestReport.java:157)
at org.gradle.api.internal.tasks.testing.junit.report.DefaultTestReport.generateFiles(DefaultTestReport.java:122)
... 38 more
BUILD FAILED
Total time: 1 mins 7.262 secs
Could it be a permissions error? Try running as a super user (sudo) or installing gradle to somewhere within your complete control. Scanning through the source code, it would suggest its failing copy a file from gradle installation to the build directory of your project. So either the file is missing, or we are getting a permission issue.
I am getting the same error but the files are all being written successfully. I can see them after I run the build.
when running java -jar myfile.jar on my RHEL 64 machine, if the install fails for some reason, i don't get back to prompt - thus the process doesn't exit
on other RHEL 64 machine, when running the same jar file, if it fails, i get back to prompt.
both machines are running the same version of java 1.6.0_25
anyone know what can cause this behavior ?
edit: the jar has an ant build xml that fails right on the beginning (i've added <fail/> task).
when running the file i get this
Total time: 1 second
validate failed
org.tp23.antinstaller.InstallException: Error running the install, Ant run failed - examine the error logs for details
at org.tp23.antinstaller.runtime.exe.AntLauncherFilter.exec(AntLauncherFilter.java:112)
at org.tp23.antinstaller.runtime.exe.AntLauncherValidateFilter.exec(AntLauncherValidateFilter.java:53)
at org.tp23.antinstaller.runtime.ExecInstall.exec(ExecInstall.java:89)
at org.tp23.antinstaller.selfextract.SelfExtractor.main(SelfExtractor.java:372)
Install failed
Error running the install, Ant run failed - examine the error logs for details
Failed
but no prompt, process still running...
Could it be that you still have some non-daemon threads sticking around? Try getting a Java stack dump with:
kill -QUIT <process_id>