'Gradle build/clean cuts off network and machine hangs

This problem has started recently, as soon I build or clean, my machine hangs and network is cut off, I have to restart machine to work on it. It is happening without opening android studio, if I do a ./gradlew clean from command prompt, still faced same issue I had this issue previously, so I checked out repo at new location.

I'm using macbook pro v12.2

Android studio 2021.1.1 Patch 2



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source