Kotlin daemon compilation failed: Could not connect to Kotlin daemon process in Android Studio


I am facing a build issue in my Android project (Kotlin/Jetpack Compose) using Android Studio on Windows.

The Error:

Daemon compilation failed: Could not connect to Kotlin daemon process

    at org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWorkAction.execute

What I have tried so far (all failed):

  1. Performed Invalidate Caches and Restart in Android Studio.

  2. Killed java.exe and adb.exe processes via Windows Task Manager.

  3. Executed Clean Project (which succeeded with BUILD SUCCESSFUL in 3s), but running Assemble fails with the same error.

  4. Added org.gradle.kotlin.daemon.enabled=false to gradle.properties to disable the daemon, but the build still throws the exact same Kotlin daemon error.

The source code itself has zero syntax errors, but the build environment keeps failing to connect or establish a new Kotlin compiler daemon.

Any suggestions on how to resolve this stuck daemon issue permanently? Thanks!

0
Aug 2 at 6:36 AM
User AvatarZAKARIA ALZAFERY
#java#android#kotlin

No answer found for this question yet.