So I just installed Android Studio again after a long time and it asked me to configure the proxy, so I did. I tested the connection and it worked.
Then it asked me
I had the same problem recently. I had my proxy setup OK but grandle could not update. After a few attempts a noticed that the "use https proxy" check button was not selected. I noticed that on the https proxy dialog which pops up while Android Studio starts.
Keep in mind that you might cant see the https setup from File-> Settings-> HTTP Proxy
, so it is important to do it using the pop-up proxy dialog on Android Studio start.
You also may have the https form filled up, but you need to select that checkbox as well (at least that worked for me).
So here are the steps I follow :
1. Invalidate Caches / Restart
2. Close any project opens by default on AS start up
3. Select "Use **https** proxy on proxy dialog
If there is VPN running on your computer you might have to turn it off.
In my case, I verified that in File > Settings> HTTP proxy, I had checked the "no proxy" option. Then I created an exception in my antivirus for Android Studio, and deleted the lines of proxy configuration of my gradle.properties file. Finally, I clicked on Sync Project with gradle files and it worked.
try the latest version of gradle build tools in build.gradle(Module:app)
here a screenshot
Just sharing what works for me.
It should work now.
Happy coding :)
In Android Studio3.6.1 you can set the Proxy and after that, you can change that to no proxy. If still having the same issue then follow these step;-
1). Check the Gradle location from in Settings->Build, Execution, Deployment->Gradle-find the location of Gradle in your PC.
2). Now go to that location and open Gradle.properties file. in this file, you have to remove the proxy settings lines.
3). That's it now your project is working