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
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.