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

前端 未结 12 1496
故里飘歌
故里飘歌 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:25

    Today i faced the same problem.I got a solution.Hope this will be helpful.

    1.Just look gradle-wrapper.properties from project opened inside android studio. distributionUrl=https://services.gradle.org/distributions/gradle-2.10-all.zip

    2.Now to go C:\Users.gradle\wrapper\dists there you can see different gradle versions.Im my case i had a latest version gradle-2.11-all.

    3.Now go to android studio - File ->invalidate Cache/Restart 4.Now edit gradle-wrapper.properties and add latest version of gradle there.After updation my gradle-wrapper.properties looked like this.

    distributionBase=GRADLE_USER_HOME
    distributionPath=wrapper/dists
    zipStoreBase=GRADLE_USER_HOME
    zipStorePath=wrapper/dists
    distributionUrl=https\://services.gradle.org/distributions/gradle-2.11-all.zip
    

    Now Sync project. Thats it. Happy Coding Guys.Have a great day.

    0 讨论(0)
  • 2021-01-02 04:25

    I also faced the same problem.I exited from Android Studio and re-opened Android Studio.In my case,The Problem Solved Then.You Can Try this Procedure.

    0 讨论(0)
  • 2021-01-02 04:27

    Sitting on MacOs 10.14.6 tried these things:

    • Close/Open Android Studio
    • Invalidate caches/Restart
    • Download latest NDK from Tools/SDK Manager
    • Delete all NDKs from mac

    Nothing helped. The only worked is reset Mac

    Still dont know what caused this behaviour

    0 讨论(0)
  • 2021-01-02 04:32

    In my case, after trying all of the above, I realised:

    • I was using the wifi network @ brandname coffeshop which had authentification.
    • I also had Global Gradle settings :"Offline work" activated (Settings/Build,Execution,Deployment/Gradle/Global Gradle settings).

    I switched to my phone hotspot, and deactivated the Offline work.

    Now (after 1 and a half hours) my builds are running again.

    Hope this helps.

    0 讨论(0)
  • 2021-01-02 04:33

    Solution: The only workaround for me is to use ipv6 instead of ipv4 : in bin/studio.vmoptions or bin/studio64.vmoptions (depending on if you are in 32 or 64 bits), change the line

    • Djava.net.preferIPv4Stack=true

    by

    • Djava.net.preferIPv6Stack=true
    0 讨论(0)
  • 2021-01-02 04:34

    Today I faced the same issue. File-Invalidate & Restart worked for me.

    0 讨论(0)
提交回复
热议问题