Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Flutter and app store releases

Gradle starts a new daemon every build and says others could not be reused

ErrorStarting a Gradle Daemon, 1 busy and 6 stopped Daemons could not be reused, use --status for details

Short answer

This line is a notice, not a failure. Gradle reuses only a daemon that is idle and matches the build: same Gradle version, same Java and same JVM arguments. A busy one is mid-build; stopped ones were shut down. Run gradle --status, stop old daemons with gradle --stop and keep JVM settings identical across tools.

  • Applies to Gradle 8.x and 9.x, JDK 17 and 21, Android Studio current stable
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    List the daemons Gradle knows about. The status column shows which are busy, idle or stopped, and which Gradle version each one runs.

    ./gradlew --status
  2. 2Match what you see, then jump to its fix

    1. 1--status lists a daemon as BUSY while you start a second buildAnother build is still using the daemonFix
    2. 2Every tool you switch between starts a new daemon, and the old ones stay idleThe IDE, the terminal and the wrapper use different JVM settingsFix
    3. 3--status shows several STOPPED entries and no idle oneDaemons were stopped for low memory or idle timeFix

What does the error look like?

  • Starting a Gradle Daemon, 1 busy and 6 stopped Daemons could not be reused, use --status for details

Cause 1 of 3

Another build is still using the daemon

1Check

A busy daemon is already running a build, so it cannot take another one. This happens when the IDE syncs while a terminal build runs, or when two terminals build at once.

./gradlew --status

2Fix

Let the first build finish, or cancel it. Gradle then starts a second daemon on its own for the new build, which is normal. If a build is stuck, stop the daemons of this Gradle version.

./gradlew --stop

3Verify

The status list shows no BUSY entry left over.

./gradlew --status

Confirmed by docs.gradle.org

Did this fix it?

Cause 2 of 3

The IDE, the terminal and the wrapper use different JVM settings

1Check

A daemon is compatible only on exact matches: Gradle version, Java version, and immutable JVM arguments such as -Xmx and -Xms. Changing org.gradle.jvmargs or GRADLE_OPTS in one place makes a new daemon.

grep -n "jvmargs" gradle.properties ~/.gradle/gradle.properties
echo "$GRADLE_OPTS"
./gradlew --version

2Fix

Set org.gradle.jvmargs once in gradle.properties and remove conflicting values elsewhere. Point the IDE's Gradle JDK at the same JDK as the terminal.

# gradle.properties
org.gradle.jvmargs=-Xmx2g

3Verify

Build once from the terminal and once from the IDE, then count the daemons.

./gradlew --status

Confirmed by docs.gradle.org

Did this fix it?

Cause 3 of 3

Daemons were stopped for low memory or idle time

1Check

A daemon stops when you run --stop, when available system memory is low, or after 3 hours idle, so the next build starts a fresh one.

./gradlew --status

2Fix

Nothing is broken. If memory is tight, lower the heap in org.gradle.jvmargs and close other heavy programs. Use --no-daemon only for one-off builds, such as a short CI job.

./gradlew assembleDebug --no-daemon

3Verify

The build finishes and the notice disappears once an idle compatible daemon exists.

./gradlew --status

Confirmed by docs.gradle.org

Did this fix it?

How do I stop it coming back?

  • Keep org.gradle.jvmargs in one gradle.properties file and do not export GRADLE_OPTS differently in each shell.
  • Use the same JDK in the IDE and in the terminal.
  • Run gradlew --stop after upgrading Gradle or the JDK, so old daemons do not pile up.
  • Avoid starting a terminal build while the IDE is still syncing.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Projects of mine built on the same technologies:

Related fixes

Mobile apps

Android Studio cannot pair the phone over Wi-Fi

The Pair devices over Wi-Fi dialog lists no device

Wireless pairing needs the phone on Android 11 or higher and on the same Wi-Fi network as the computer, with current Platform-Tools.

4 causes, each with a fix

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.