Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create new project on Android, Error: Studio Unknown host 'services.gradle.org'

Tags:

android

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?

like image 767
Jhohannes Purba Avatar asked Oct 30 '13 09:10

Jhohannes Purba


People also ask

How do you fix unknown host services gradle org You may need to adjust the proxy settings in gradle?

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.

What is gradle sync issue?

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.


1 Answers

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.

like image 110
Pratik Mistry Avatar answered Sep 25 '22 09:09

Pratik Mistry