gpt4 book ai didi

android - 在 Jenkins 上构建 Android 项目时,Gradle 构建守护进程意外消失(它可能已被杀死或崩溃)

转载 作者:IT王子 更新时间:2023-10-28 23:50:25 26 4
gpt4 key购买 nike

我有一个在 Android Studio 上成功构建的 Android 项目。

现在我想在 Jenkins 上构建它。但是当我这样做时,出现以下错误:Gradle build daemon 意外消失(可能已被杀死或崩溃)

异常(exception)是:

org.gradle.launcher.daemon.client.DaemonDisappearedException: Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)
at org.gradle.launcher.daemon.client.DaemonClient.handleDaemonDisappearance(DaemonClient.java:222)
at org.gradle.launcher.daemon.client.DaemonClient.monitorBuild(DaemonClient.java:198)
at org.gradle.launcher.daemon.client.DaemonClient.executeBuild(DaemonClient.java:162)
at org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.java:125)
at org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.java:80)
at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:43)
at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:173)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:241)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:214)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:207)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
at org.gradle.launcher.Main.doAction(Main.java:33)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:55)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:36)
at org.gradle.launcher.GradleMain.main(GradleMain.java:23)

我阅读了相关主题,但没有帮助。我尝试使用 gradle daemon 构建它,没有它,但问题仍然存在。

最佳答案

编辑新版本的 Gradle 似乎发生了一些变化。

Since 3.0 you should not disable the daemon on your CI anymore

[We] recommend using [the daemon] for both developers' machines and Continuous Integration servers.

However, if you suspect that Daemon makes your CI builds unstable, you can disable it to use a fresh runtime for each build since the runtime is completely isolated from any previous builds.

以前的答案

It's recommended to turn off daemon on any CI server .使用此选项禁用它

--no-daemon

关于android - 在 Jenkins 上构建 Android 项目时,Gradle 构建守护进程意外消失(它可能已被杀死或崩溃),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37171043/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com