Gradle error: "Unable to start the daemon process" and "Could not initialize native services" on Windows

1 week ago 8
ARTICLE AD BOX

I’m trying to build an Android project in Android Studio on Windows, but Gradle fails to start with the following error:

Unable to start the daemon process. This problem might be caused by incorrect configuration of the daemon. Process command line: C:\Program Files\Android\Android Studio\jbr\bin\java.exe ... FAILURE: Build failed with an exception.

What went wrong: Could not initialize native services.

Caused by: net.rubygrapefruit.platform.NativeException: Failed to initialise native integration.

Caused by: java.lang.UnsatisfiedLinkError: C:\Users\Mohebbat.gradle\native\0.2.7\x86_64-windows-gnu\gradle-fileevents.dll: The specified procedure could not be found

What I have already tried:

Deleted .gradle/ folder inside the project

Deleted .idea/

Cleaned C:\Users<User>.gradle (parts of it cannot be deleted; Windows says the folder is not empty)

Killed all Java processes

Reset Gradle wrapper to a known working version

Reinstalled Android Studio

Still, the same error happens, and it seems to be caused by this file:

C:\Users<User>.gradle\native\0.2.7\x86_64-windows-gnu\gradle-fileevents.dll

Why is Gradle failing to initialize native services on Windows, and how can I fully reset or fix the corrupted .gradle\native folder so that the daemon can start successfully?

Read Entire Article