I have been trying to switch my project from Intellij to Android Studio, which has required me to create a build.gradle file. I know I can add each of these as a library dep
If you use VPN
| Proxy
on your system then use your proxy info in the gradle.properties
file in your project like the following lines of code:
# HTTP Proxy
systemProp.http.proxyHost={Host Address}
systemProp.http.proxyPort={Port Number}
systemProp.http.proxyUser={Proxy Username}
systemProp.http.proxyPassword={Proxy Password}
systemProp.http.nonProxyHosts={NonProxy Hosts Address} # like: 127.0.0.1,localhost
# HTTPS Proxy
systemProp.https.proxyHost={Host Address}
systemProp.https.proxyPort={Port Number}
systemProp.https.proxyUser={Proxy Username}
systemProp.https.proxyPassword={Proxy Password}
systemProp.https.nonProxyHosts={NonProxy Hosts Address} # like: 127.0.0.1,localhost
Now just replace {.....}
in the above code with appropriate data
Also you can set Android studio proxies like the following image by your proxy info in File>Settings
:
Now test again...!