“Starting Gradle daemon” loop creating endless processes

前端 未结 4 1316
梦如初夏
梦如初夏 2021-02-14 20:37

Whenever I open or create a project in Android Studio, and it starts to do its background build or whatever, it gets to \"Starting Gradle daemon\", but gets in a loop and never

相关标签:
4条回答
  • 2021-02-14 21:04

    I have same Error on Win 10, I searched a lot but nothing helped me.

    • I off/on window firewall, defender, edit rules ...etc. no result

    Solution is (may be)

    restore all firewall settings.

    old style Control Panel → System & Safety → Windows Defender → Restore Defaults

    Note: options/words may not very similar, because it translated.


    Update 1:

    Other solution

    is run Build before connect PC to internet, then after Daemon started connect to network, and builds will work fine.

    or you can try disabling Daemon, or let it work offline.

    I hope this could help someone.

    0 讨论(0)
  • 2021-02-14 21:05

    I had the same issue and i have tried almost all options , increased my RAM and added SSD to speed up but same issues remains..

    Solution is simple : Restart your computer open android studio , then your project and now when building you app just disconnect your pc from wifi and internet and make sure your hotspot is turned off .. Now, i am at ease its working fine .

    0 讨论(0)
  • 2021-02-14 21:10

    I had the same problem on Linux. I traced it down to a firewall misconfiguration. It prevented Android Studio from communicating with Gradle daemon using IP over loopback interface.

    0 讨论(0)
  • 2021-02-14 21:15

    The cause in my case was the Windows Mobile Hotspot feature (aka, adHoc Adapter or Wi-Fi Direct Virtual Adapter).

    For some reason, while the hotspot is on, gradle server cannot accept incoming connections from /127.0.0.1 according to the log file in %userProfile%\.gradle\daemon\<version>\. And so, it keeps spawning new daemons thinking the old ones (sleeping in wait for connections) are dead.

    As soon as I disabled the hotspot, the next build worked. The curious thing was that after I re-enabled it, gradle build continued to work.

    This problem started only after upgrading from AS 4.0 to 4.1 and stayed for the next upgrades too.

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