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 find when I change the option of Preferences -> Appearance & Behavior -> System Settings -> HTTP Proxy to Manual proxy configuration, the gradle properties of the project won't change, so I add:
systemProp.http.proxyHost= myProxyHost systemProp.http.proxyPort= myProxyPort
Then it runs well.