PC パソコン

Android Studio: Fix “R8D8ThreadPoolBuildService is not registered”

Android Studio project sync or a Gradle build can fail with R8D8ThreadPoolBuildService ... is not registered. The message comes from the Android Gradle Plugin (AGP), not from application Java or Kotlin code: AGP attempted to access an internal Build Service used by R8 and D8, but that service was not registered. Google marks the issue fixed. The fix appears in Android Studio Panda 3 Canary 2 with AGP 9.2.0-alpha02 and is also listed in the stable AGP 9.2.0 release notes.

Representative error

Service com.android.build.gradle.internal.services.
R8D8ThreadPoolBuildService_9708b6e1-8dd6-4998-b269-8c8bf80b728b
is not registered.

BUILD FAILED

The UUID suffix can differ between runs. Search for the stable fragments R8D8ThreadPoolBuildService and is not registered.

Cause

R8 and D8 perform Android code shrinking, optimization, and DEX processing. AGP registers a Gradle Build Service to share the thread pool used by those tools. In the affected implementation, AGP could attempt to obtain the service when the required registration was missing, causing project sync or the build to fail.

Google’s public issue identifies this as an AGP bug and marks it Fixed. The public record does not document every internal path that can trigger it, so do not assume that your R8 configuration or ProGuard rules are malformed.

Affected conditions and versions

  • The original Google report reproduced the failure while syncing a project with the then-current Narwhal Android Studio build.
  • The report did not limit the failure to one particular Gradle version.
  • The fix is listed for Android Studio Panda 3 Canary 2, released with AGP 9.2.0-alpha02.
  • Google’s stable AGP 9.2.0 release notes also list Issue #437828055 as fixed.

Recommended solution

1. Check the current AGP, Gradle, and JDK versions

./gradlew --version
./gradlew buildEnvironment

If the project uses a Version Catalog, inspect gradle/libs.versions.toml. Otherwise, check the root build.gradle.kts or build.gradle file for the AGP version.

2. Upgrade to AGP 9.2.0 or newer

Prefer a stable AGP release that contains the fix rather than remaining on the affected preview tooling.

// build.gradle.kts
plugins {
    id("com.android.application") version "9.2.0" apply false
    id("com.android.library") version "9.2.0" apply false
}

For a Version Catalog:

[versions]
agp = "9.2.0"

3. Align Gradle and the JDK with the compatibility table

The official AGP 9.2.0 compatibility table specifies Gradle 9.4.1 and JDK 17 as its minimum/default toolchain. Update the Wrapper and select JDK 17 as Android Studio’s Gradle JDK.

# gradle/wrapper/gradle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip

4. Stop old Gradle daemons and rebuild

./gradlew --stop
./gradlew clean
./gradlew assembleDebug

This avoids continuing with a daemon created by the previous toolchain. Treat it as a post-upgrade validation step, not as a replacement for the AGP fix.

Alternative when an upgrade is not yet possible

If the project cannot move to AGP 9.2.0 immediately, temporarily pin the Android Studio, AGP, Gradle, and JDK combination that was working before the regression. This is a workaround, not Google’s fix. Keep the same versions in local development and CI so that the failure does not depend on the machine running the build.

How to verify the fix

  1. Run ./gradlew --version and confirm the Gradle and JDK versions.
  2. Run Sync Project with Gradle Files in Android Studio.
  3. Run ./gradlew clean assembleDebug.
  4. If the project uses R8 for release builds, also run ./gradlew assembleRelease.
  5. Confirm that the log no longer contains R8D8ThreadPoolBuildService ... is not registered.

Cautions

  • Do not delete unrelated ProGuard or R8 rules in response to this service-registration error.
  • Clearing Gradle caches may appear to help temporarily, but it is not the documented permanent fix for an affected AGP version.
  • Do not update AGP while leaving an incompatible Gradle Wrapper or JDK in place.
  • AGP 9.2.0-alpha02 is the preview build where the fix was first listed. Prefer stable AGP 9.2.0 or a newer compatible stable release.

Summary

R8D8ThreadPoolBuildService is not registered is a fixed AGP Build Service registration bug. Upgrade to AGP 9.2.0 or newer, align the toolchain with Gradle 9.4.1 and JDK 17, and verify both project sync and debug/release builds. If upgrading is temporarily impossible, pin the last known-good toolchain combination.

Official references