Gradle sync failed: Connection refused

后端 未结 29 3137
小鲜肉
小鲜肉 2020-11-29 10:14

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

29条回答
  •  星月不相逢
    2020-11-29 10:45

    This should work:

    1. Go to 'Gradle Scripts'

    2. Then go to 'gradle.properties'.

    3. There you will see proxy settings something like:

      systemProp.http.proxyHost=[YOUR PROXY]

      systemProp.http.proxyPort=[PORT]

      As you may see this is for 'http' only.

    4. Just add the same for 'https':

      systemProp.https.proxyHost=[YOUR PROXY]

      systemProp.https.proxyPort=[PORT]

      Worked for me.

提交回复
热议问题