你的网络设置，有设置 nat masquerade 吗？
We have observed this can occur when network address translation (NAT) masquerade is used. When NAT masquerade is enabled, connections that should be considered local to the machine are masked to appear from external IP addresses. Gradle refuses to connect to any external IP address as a security precaution.
The solution to this problem is to adjust your network configuration such that local connections are not modified to appear as from external addresses.
You can monitor the detected network setup and the connection requests in the daemon log file ($GRADLE_USER_HOME/daemon/<Gradle version>/daemon-<PID>.out.log).