After installing Android studio and creating a new project, I get the following error:
Unknown host \'services.gradle.org\'.
Please ensure
Go to setting option which is on upper strip of android studio and follow the below steps to solve the problem.
setting > Appearance&behavior > HTTP and proxy > click on Auto detect Enable option.(The option with radio box)select this one...
I have same problem after update android studio to 1.5, and i fix it by update the gradle location,
Hope this method works for you,
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.
I tried above answers and they didn't help in my case.
I solved it with this link help: http://vjscrazzy.blogspot.co.il/2016/02/failed-to-sync-gradle-project.html
step 1) file>Setttings>appearance and behaviour> system setttings>HTTP proxy> set No Proxy
step 2) build,execution and deployment> Build tools > gradle> now under project level settings > select local gradle distribution> gradle home = F:/Program Files/Android/Android Studio/gradle/gradle-2.4
After that, I did these changes(because it still wrote me some other errors)
Android Studio asked me:
Android Studio asked me to update my Gradle version (which he didn't before)
Enable - Tools> Android> Enable ADB integration.
Also, if your working in a team with repositories, it's important to check that the version of the Andorid Studio is the same.