How to remove JVM property "https.proxyHost"?

22,430

Solution 1

If anyone still looking for the solution to the same, here is what worked for me

JAVA_OPTS="$JAVA_OPTS -DsocksProxyPort"

for removing http proxy ports

Source http://mxw.pl/blog/?p=4

Solution 2

Using a Mac:

Go to Network settings -> Advanced -> Proxies and uncheck "proxy server required password" for both HTTP and HTTPS. Remove user name and password.

In IntellJ/Android Studio restart with File -> Invalidate and Restart -> Just Restart

Solution 3

select Help -> Edit Custom VM Options add below:

-Dhttp.proxyHost
-Dhttp.proxyPort
-Dhttps.proxyHost
-Dhttps.proxyPort
-DsocksProxyHost
-DsocksProxyPort

Solution 4

on Mac: goto System Preferences, Java -> open java control pan -> general -> Network Settings -> choose 'Direct Connection' enter image description here

Solution 5

This is caused by switching agents on and off many times. Under Mac: Open the 〜/.gradle/gradle.properties file and delete the agent configuration manually.

Share:
22,430
silverFoxA
Author by

silverFoxA

Started as a graphics designer, became a programmer, advanced to a developer and now an entrepreneur. Co-Founder - Madgeek Check out my YouTube Channel for Development YouTube Channel

Updated on July 30, 2022

Comments

  • silverFoxA
    silverFoxA almost 2 years

    I was using proxy on my system for some purpose. But now I don't have any proxy set on my system as well as from the Android Studio proxy settings I have removed the proxy and set it to no proxy.

    But I keep getting the following error:

    You have JVM property "https.proxyHost" set to .... This may lead to incorrect behavior. Proxy should be set in Settings|HTTP Proxy

    As well when I try to build/sync the Gradle file without proxy server the files doesn't get compiled and says please check your network connection where I have internet connection.

  • inderbagga
    inderbagga almost 8 years
    May you please elaborate, where do i need to type this line.
  • inderbagga
    inderbagga almost 8 years
    i already did that. You saved my hours thanks, but after executing this line terminal didn't gave any response
  • silverFoxA
    silverFoxA almost 8 years
    It doesn't return but if no error that means it has been processed successfully
  • ManuQiao
    ManuQiao about 7 years
    -DsocksProxyPort? Is that the reference article mistyped?
  • silverFoxA
    silverFoxA about 7 years
    It's not but would suggest you to type it n the terminal rather copy pasting
  • qinmiao
    qinmiao over 6 years
    JAVA_OPTS="$JAVA_OPTS -DsocksProxtPort"
  • Shashank Saxena
    Shashank Saxena about 6 years
    Brother, you just saved me another gruelling hour. I want to send you flowers.
  • Leon
    Leon over 5 years
    Make sure to restart Android Studio after making this change.
  • Bhargav
    Bhargav almost 5 years
    for macs @AmreshDeshpande answer is better
  • Garfield
    Garfield about 3 years
    This is the best answer , because only need configure once and never need to worry this problem again
  • Yusuf BESTAS
    Yusuf BESTAS about 3 years
    Hello,I was checked this link mxw.pl/blog/?p=4 but doesn't work .Can you explain.How can ı apply this solution?thank you.
  • Barnyard
    Barnyard over 2 years
    I had a proxy issue with a fresh install of Android Studio, but this solved it.