Android Studio supports HTTP proxy settings so you can run Android Studio behind a firewall or secure network. To set the HTTP proxy settings in Android Studio:
- From the main menu choose File > Settings > Appearance & Behavior -- System Settings -- HTTP Proxy.
- In Android Studio, open the IDE Settings dialog.
- On Windows and Linux, choose File > Settings > IDE Setting -- HTTP Proxy.
- On Mac, choose Android Studio > Preferences > IDE Setting -- HTTP Proxy.
- Select auto-detection to use an auto-configuration URL to configure the proxy settings or manual to enter each of the settings. For a detailed explanation of these settings, see HTTP Proxy.
- Click Apply to enable the proxy settings.
Android Plugin for Gradle HTTP proxy settings
For application-specific HTTP proxy settings, set the proxy settings in the
build.gradle
file as required for each application module.apply plugin: 'com.android.application' android { ... defaultConfig { ... systemProp.http.proxyHost=proxy.company.com systemProp.http.proxyPort=443 systemProp.http.proxyUser=userid systemProp.http.proxyPassword=password systemProp.http.auth.ntlm.domain=domain } ... }