0
我試圖運行gradle命令。這一開始工作。但是它在一段時間後已經開始失敗,因爲它不能啓動守護進程。我在Windows 7 Enterprise上使用Gradle 2.5和IBM jdk 1.6。gradle命令失敗,因爲它無法啓動守護進程
我已清理我的用戶主目錄中的.gradle目錄並重新啓動我的系統。
這工作正常我的朋友機器相同的版本。 請幫忙。
org.gradle.api.GradleException: Could not start Gradle daemon. at org.gradle.launcher.daemon.client.DefaultDaemonStarter.startProcess(DefaultDaemonStarter.java:137) at org.gradle.launcher.daemon.client.DefaultDaemonStarter.startDaemon(DefaultDaemonStarter.java:114) at org.gradle.launcher.daemon.client.DefaultDaemonConnector.startDaemon(DefaultDaemonConnector.java:109) at org.gradle.launcher.daemon.client.DefaultDaemonConnector.connect(DefaultDaemonConnector.java:87) at org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.java:117) at org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.java:77) at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:40) at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:170) at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:23 7) at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:21 0) 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:206) 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:60) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:611) at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54) at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35) at org.gradle.launcher.GradleMain.main(GradleMain.java:23) Caused by: org.gradle.api.UncheckedIOException: java.io.EOFException at org.gradle.launcher.daemon.bootstrap.DaemonStartupCommunication.readDiagnostics(DaemonStartupCommunication.ja va:100) at org.gradle.launcher.daemon.bootstrap.DaemonGreeter.parseDaemonOutput(DaemonGreeter.java:40) at org.gradle.launcher.daemon.client.DefaultDaemonStarter.startProcess(DefaultDaemonStarter.java:133) ... 24 more Caused by: java.io.EOFException at java.io.DataInputStream.readBoolean(DataInputStream.java:238) at org.gradle.internal.serialize.InputStreamBackedDecoder.readBoolean(InputStreamBackedDecoder.java:47) at org.gradle.internal.serialize.AbstractDecoder.readNullableString(AbstractDecoder.java:53) at org.gradle.launcher.daemon.bootstrap.DaemonStartupCommunication.readDiagnostics(DaemonStartupCommunication.ja va:85) ... 26 more
感謝您的回覆。當我試圖運行gradle - 沒有守護進程時,它可以工作。 gradle - 停止停止守護進程但不能解決問題。我仍然需要使用--no-daemon。 Oracle JDK現在也出現這種情況。它昨天,今天重新啓動我的機器後,它給出了同樣的問題。 –
所以這個問題不是用jdk或你的構建腳本。它是Windows上可能不穩定的Windows上的gradle守護進程。你能否看到你的代碼是否正確釋放文件(在'finally'塊中)。您可以創建示例項目複製問題並在此處記錄問題:https://issues.gradle.org/ – kunal