Gradle daemon never stop after closing IDE


Maybe my question is related to this one : What to do about "Gradle Daemon stays open after Eclipse shuts down"?

I’m using Android Studio (IntelliJ based IDE) under Linux Mint 17.2.

When I compile my application for the first time, a new Java process is started for Gradle Daemon.
When I close Android Studio this process is still alive and can use more than 1GB of memory.

I read on the web that the daemon should stop after a time, but it is alive now since more than 2 hours.

I’d like some explanations about this. Is this issue related to Android Studio, Gradle, something else ? How to make the daemon to shut down with IDE ?

Thank you.

The Daemon should time out after 3 hours of inactivity. You can read more about the daemon in the User Guide:

You should be able to explicitly stop it with gradle --stop

OK, thank you for the answer.
So this is related to Android Studio that should “gradle --stop” before closing (or at least provide an option to do it).

I found this bug report :
In Android Studio on Linux, the gradle batch file doesn’t have the executable bit, so that Android Studio fails to stop it. After making the file as executable, gradle is fine closed with Android Studio.