After installing Android studio and creating a new project, I get the following error:
Unknown host 'services.gradle.org'.
Please ensure the host name is correct. If you are behind an HTTP proxy, please configure the proxy settings either in Android Studio or Gradle.
Consult IDE log for more details (Help | Show Log)
How can I fix it?
On your android studio goto file -- settings -- Build, Execution, Deployment --Build Tools -- Gradle and choose Use local gradle distribution, in the gradle home locate your gradle folder and click apply. Then click okay. This solved the problem for me.
Gradle Sync is a Gradle task who's main function is to check all the dependencies in your build. gradle files which are associated with your Android studio project and then download that specified version (if not downloaded already). Gradle Project Sync Failed.
I was also having the same problem. I tried the following and it's working for me now:
Please try the following steps:
Go to..
File > Settings > Appearance & Behavior > System Settings > HTTP Proxy [Under IDE Settings] Enable following option Auto-detect proxy settings
On Mac it's under:
Android Studio > Preferences > Appearance & Behaviour... etc
you can also use the test connection button and check with google.com to see if it works or not.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With