silverFoxA
silverFoxA

Reputation: 4659

How to remove JVM property "https.proxyHost"?

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.

Upvotes: 24

Views: 35265

Answers (8)

viik_yh
viik_yh

Reputation: 21

In my case, my global gradle settings were set with http proxy, so I checked this file: ~/.gradle/gradle.properties and found that http/https proxy was set. I deleted them then problem solved.

Upvotes: 1

resatz
resatz

Reputation: 576

On Mac , Go to System Settings -> Network -> Proxies

enter image description here

Make sure all these (HTTP,HTTPS,SOCKS) are cleared & Off, Set proxy in your IntellIJ

Upvotes: 1

Mr.LongFace
Mr.LongFace

Reputation: 21

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.

Upvotes: 2

paperhs
paperhs

Reputation: 204

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

Upvotes: 7

daroubaozi
daroubaozi

Reputation: 462

select Help -> Edit Custom VM Options add below:

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

Upvotes: 28

Iman Marashi
Iman Marashi

Reputation: 5753

I solved this problem by this solution:

On Windows:

Go to your User Folder - on Windows 7/8 this would be:

[SYSDRIVE]:\Users\[your username] (ex. C:\Users\Iman\)

In this folder there should be a folder called .AndroidStudioBeta or .AndroidStudio (notice the period at the start - so on some OSes it would be hidden).

Delete this folder (or better yet, move it to a backup location - so you can return it if something goes wrong).

This should reset your Android Studio settings to default.

Upvotes: 1

Amresh Deshpande
Amresh Deshpande

Reputation: 287

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

Upvotes: 13

silverFoxA
silverFoxA

Reputation: 4659

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

Upvotes: 29

Related Questions