Why did the Gradle Daemon die?

给你一囗甜甜゛ 提交于 2019-12-22 17:59:45

问题


How do I determine why my Gradle Daemon died? The only message I get isL

Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)

This occurs in an active build. Several steps will finish and a step will appear to be active and then the build fails.

This began after moving our memory args (Xmx Xms PermGen) from a shell script that called gradlew to gradle.properties and calling gradlew directly.

build.sh

export GRADLE_OPTS="\"-Xmx1024m\" \"-Xms256m\" \"-XX:MaxPermSize=256m\""
export JAVA_HOME="/usr/local/java/jdk1.6"
exec ./gradlew "$@"

Addition to gradle.properties

org.gradle.java.home=/usr/local/java/jdk1.6/
org.gradle.jvmargs=-Xmx1024m -Xms256m -XX:MaxPermSize=256m

After this change Gradle warns:

To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: http://gradle.org/docs/2.2.1/userguide/gradle_daemon.html

And even though we don't ask it to, the build is running in a daemon, which ultimately fails.


回答1:


Gradle build daemon disappeared unexpectedly most frequently occurs when something else kills the long-running Gradle Daemon process and the client process (the Daemon uses local TCP connections to communicate) tries to send a message and gets no response.

For example, running gradle --stop or killall java while a build is occurring will reproduce this problem.



来源:https://stackoverflow.com/questions/29660238/why-did-the-gradle-daemon-die

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!