Gradle sync failed: Connection refused

后端 未结 29 3014
小鲜肉
小鲜肉 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:47

    You should configure Proxy settings on Android Studios menu (File | Settings). Another strategy is to configure the file gradle.properties.

    So, add theses lines for the end of gradle.properties located on the app folder base.


    systemProp.http.proxyPassword=[PASSWORD]
    systemProp.http.proxyHost=[IP ADDRESS]
    systemProp.https.proxyPort=[PORT, TYPICALLY 3128]
    systemProp.https.proxyUser=[USERNAME]
    systemProp.https.proxyHost=[IP ADDRESS]
    systemProp.https.proxyPassword=[PASSWORD]
    systemProp.http.proxyPort=[PORT, TYPICALLY 3128]
    systemProp.http.proxyUser=[USERNAME]
    

    Pay attention, the passwords and others values that have special chars must have slash character such as (\#) and so on.

提交回复
热议问题