So I just installed Android Studio again after a long time and it asked me to configure the proxy, so I did. I tested the connection and it worked.
Then it asked me
I have the same problem.can't connect to socks proxy connection refused. try
can't connect to socks proxy connection refused
1.turn off vpn
2.File -> Invalidate Caches / Restart
This operation can fix this problem