Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle sync failed: The first result from the daemon was empty. Most likely the process died immediately after connection

I just recently downloaded an Android Studio and installed it on my PC. But When I try to set up my first project "hello world", it always brings up the following:

Gradle sync failed: The first result from the daemon was empty. Most likely the process died immediately after connection.
Consult IDE log for more details (Help | Show Log)

like image 432
JonathanLu Avatar asked Sep 10 '16 23:09

JonathanLu


2 Answers

I solved the problem by doing the following:

  1. go to C:/Users/.../.gradle/daemon/
  2. open any of the folders in daemon
  3. look for this file registry.bin.lock
  4. delete it
  5. now go sync the gradle in Android Studio and your problem will be solved

Success

like image 181
Kali Kimanzi Avatar answered Nov 06 '22 05:11

Kali Kimanzi


I was facing the same problem in Android Studio 3.However, none of the solutions mentioned here worked for me.With only 4 GB of RAM available ,the only thing worked for me was just changing the value specified for JVM args which is related to RAM in gradle.properties file like the following:

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.

org.gradle.jvmargs=-Xmx1536m

to:

org.gradle.jvmargs=-Xmx512m

then File | Invalidate Caches/Restart--> Invalidate and Restart

This really did the trick.

like image 6
mohammed youser sawwas Avatar answered Nov 06 '22 05:11

mohammed youser sawwas