How to configure proxy in Android Studio?

5

Company where work joined proxy use and I'm having trouble using gradle .

The gradient returns the following error:

  

Error: Connection timed out: connect. If you are behind an HTTP proxy, please configure the proxy settings either in IDE or Gradle.

Has anyone ever had to configure this?

    
asked by anonymous 28.07.2015 / 18:15

2 answers

6

I was able to configure proxy through the following steps:

In Android Studio navigate to:

File > Settings > System Settings > HTTP Proxy 

Under this menu, check the Manual proxy configuration option and select HTTP

Host name: "your proxy url"

Port number: "Your proxy port"

If your proxy has a username and password, you should add in the appropriate fields Login and password .

After following these steps from OK and re-run the build in gradle .

    
28.07.2015 / 18:20
1

I have a detail to add.

In some cases you will also need to configure HTTP S

After setting through the FILE & SETTINGS & HTTP> PROXY menu, a window with the proxy settings set (only at the first synchronization) will be opened in the first synchronization (if the manual proxy is selected). Also check the HTTPS option, as this option was not available on the first configuration.

If the problem persists, select the NO PROXY option, apply the changes, and try to redo the PROXY MANUAL configuration, remembering to check the HTTPS option on the first run.

I hope it's useful. Att., Daniel

    
28.11.2018 / 13:12