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

前端 未结 12 1501
故里飘歌
故里飘歌 2021-01-02 04:23

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:

<
12条回答
  •  执念已碎
    2021-01-02 04:46

    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.

提交回复
热议问题