1

I want to set HTTPS proxy in Android Studio for Gradle. There is no standard options for set it via dialog box (HTTP or SOCK only), but according this guide I set it via gradle.properties file in my project.

systemProp.https.proxyHost = 8.8.8.8 // just for example
systemProp.https.proxyPort = 8080

I found a free proxy server and checked it via web browser, but it is not work for Android Studio. Any hints?

Style-7
  • 985
  • 12
  • 27

1 Answers1

1

Here is an answer of mine describing how to configure proxy over Gradle.

To make sure that the properties you have set is active, You can use the command line at the project directory (where gradle.properties is located) and type gradle properties, This should list all the active gradle properties at the current location.

You can also add to gradle home where it is usually located at C:/Users/%USERNAME%/.gradle, This way you will have a global setup, so you don't have to add the proxy to all gradle.properties

George
  • 2,292
  • 2
  • 10
  • 21
  • I run in AS in terminal window "gradlew properties". Two lines of proxy settings exist, but proxy not work. I need HTTPS proxy only, is this possible? So? – Style-7 Sep 05 '22 at 08:43
  • Are you sure of proxy and port ? Proxy accessible to the site with browser ? – George Sep 05 '22 at 13:27
  • Yes it is. But I not set HTTP parameters. I want to use HTTPS proxy only. Is this possible? https://stackoverflow.com/a/39415015/9057721 – Style-7 Sep 05 '22 at 13:36
  • My proxy is free and not stable. May be delay more than 1 seconds. – Style-7 Sep 05 '22 at 13:41
  • Maybe try [psiphone](https://psiphon.ca/en/download.html?psiphonca) as suggested in my previous answer, Its also free but stable with the ability to configure port. – George Sep 05 '22 at 13:48
  • 1
    Upps! I restarted AS and this works! Last question. Is AS will cash downloaded dependences or will repeat it again and again? Thank you. – Style-7 Sep 05 '22 at 13:55