“Starting Gradle daemon” loop creating endless processes

前端 未结 4 1304
梦如初夏
梦如初夏 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: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\\. 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.

提交回复
热议问题