Received status code 407 from server: Proxy Authentication Required

I managed to fix it this way:

  1. Android Studio (my version 3.1.2)->Settings->Http proxy->Manual proxy configuration (!!!)->Enter login and password->Check connection
  2. Possible restart Android Studio, I don't remember
  3. When gradle build was started then window with proxy settings with HTTP and HTTPs(!) for gradle was opened-->Apply settings
  4. After that file " (Global properties)" was automatically created, inside you must enter a password:

    systemProp.http.proxyPort=8080 systemProp.http.proxyUser=domain/login systemProp.http.proxyPassword= systemProp.https.proxyPassword= systemProp.https.proxyHost=proxy_host #systemProp.http.nonProxyHosts= systemProp.http.proxyHost=proxy_host systemProp.https.proxyPort=8080 #systemProp.https.nonProxyHosts= systemProp.https.proxyUser=domain/login

Go to C:\Users\windows user\.gradle which is mostly default in most of the systems. Open file (You can Use Visual Studio Code editor ). Just view the proxy setting and modify them if required.

For me password was blank, I filled the password field and Gradle worked perfectly.

The above thing works only if u enabled proxy in Android studio.

To solve this problem I'm using this code lines :



and then restart Android Studio.

I'm using this two lines and works fine for me.


If you need to use authentication add these two more lines:


I never had to use https settings.

Be sure that Http proxy which you are using is able to bypass Https protocol. I suggest using sites like, which even provide proxy servers without authentication.

But first test the proxy in browser.

IF you really need to use the proxy server which you have (Being behind a firewall or something). The alternative way of binding proxy is to use softwares like Proxifier Alternatives. This app can force all connection through proxy Rules Screenshot.