4

I am developing Android applications with Android Studio 2.0. I read in a lot of blogposts that enabling the gradle daemon should increase the build performance drastically.

My problem is, that I do not know how to check if the daemon is running. I added the line

org.gradle.daemon=true

to the gradle.properties file but Android Studio shows me a unused property warning, so I am not sure if the daemon is actually running. How can I find out if the daemon is actually running?

azizbekian
  • 60,783
  • 13
  • 169
  • 249
Lukas Lechner
  • 7,881
  • 7
  • 40
  • 53
  • Maybe this helps: https://stackoverflow.com/questions/23265217/how-to-know-whether-you-are-running-inside-a-gradle-daemon – tomasulo Apr 22 '16 at 10:26
  • Possible duplicate of [Building and running app via Gradle and Android Studio is slower than via Eclipse](http://stackoverflow.com/questions/16775197/building-and-running-app-via-gradle-and-android-studio-is-slower-than-via-eclips) – Zeeshan Shabbir Apr 22 '16 at 10:26

2 Answers2

9

Long time passed since the question is asked, but I see no exact answer to the question:

How can I find out if the gradle daemon is running?

Running in terminal gradle --status will give the status of the gradle. You'll see "No Gradle daemons are running" message if there's no gradle daemon running.

No daemon

Otherwise, you'll see status of the daemon.

Daemon running

azizbekian
  • 60,783
  • 13
  • 169
  • 249
  • Isn't this working only for standalone Gradle? Or am i missing something? AFAIK Android studio runs Gradle Daemon internally. So this solution will return following error `gradle: The term 'gradle' is not recognized as a name of a cmdlet, function, script file, or executable program....` unless user had set up gradle outside of Android Studio beforehand. – GreenMarty Aug 21 '23 at 08:39
1

Android Studio (based on IntelliJ) always uses the Gradle Daemon internally. See about

You only need to enable the Daemon for builds you invoke on the command-line and here's how to do that:

echo "org.gradle.daemon=true" >> $PROJECT_DIR/gradle.properties
Manuel Jordan
  • 15,253
  • 21
  • 95
  • 158
Eric Wendelin
  • 43,147
  • 9
  • 68
  • 92