This error message is a java.net.SocketException
, which typically occurs when Java tries to establish a network connection but fails due to a connectivity issue and this is most likely a network issue preventing Gradle from downloading dependencies.
step to resolve this:
manually download the binary_only file from the gradle website
follow the step from this youtube channels.