I am getting this error in android studio 3.0.
<Unknown host \'dl.google.com\' You may need to adjust the proxy settings in Gradle
please check your gradle wrapper, there are 2 gradle wrapper, one is in library folder, and one is in gradle folder. probably the version of both gradle wrapper is different. i solve my case by make them as a same version..
In my case, after I config kotlin for project I face this problem.
After 30 minutes try 'Auto proxy' and learn about proxy with no hope, I see suddenly I see
repositories {
mavenCentral()
}
in the end of my build.gradle
. Then I delete it and it working.
The most interesting is after it working, I put above line to gradle
again but it still working.
So maybe it is not a root problem, however I think it may bring some luck in some case.
Currently, I use Window
and AndroidStudio 3.4.2
Also, check the internet connection and try again clean and build it's worked for me.
Restarting emulator worked for me.
I was also having the same problem. I tried the following and it's working for me:
Windows
Go to : File > Settings > Appearance & Behavior > System Settings > HTTP Proxy [Under IDE Settings] Enable following option Auto-detect proxy settings
Mac
Go to : Android Studio > Preferences > Appearance & Behavior.. etc
You can also use the test connection button and check with google.com to see if it works or not.
I was facing the same error even after trying every possible combination of proxy settings, invalidate cache and restart.
The error vanished as soon as I switched my internet connection from wifi to mobile hotspot. Strange.