Reputation: 4659
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
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
Reputation: 576
On Mac , Go to System Settings -> Network -> Proxies
Make sure all these (HTTP,HTTPS,SOCKS) are cleared & Off, Set proxy in your IntellIJ
Upvotes: 1
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
Reputation: 204
on Mac:
goto System Preferences, Java -> open java control pan -> general -> Network Settings -> choose 'Direct Connection'
Upvotes: 7
Reputation: 462
select Help -> Edit Custom VM Options
add below:
-Dhttp.proxyHost
-Dhttp.proxyPort
-Dhttps.proxyHost
-Dhttps.proxyPort
-DsocksProxyHost
-DsocksProxyPort
Upvotes: 28
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
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
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