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

前端 未结 4 1382
無奈伤痛
無奈伤痛 2020-11-27 06:46

After installing Android studio and creating a new project, I get the following error:

Unknown host \'services.gradle.org\'.

Please ensure

相关标签:
4条回答
  • 2020-11-27 06:57

    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...

    0 讨论(0)
  • 2020-11-27 07:01

    I have same problem after update android studio to 1.5, and i fix it by update the gradle location,

    1. Go to File->Setting->Build, Execution, Deployment->Build Tools->Gradle
    2. Under Project level Setting find gradle directory

    Hope this method works for you,

    0 讨论(0)
  • 2020-11-27 07:04

    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.

    0 讨论(0)
  • 2020-11-27 07:10

    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:

    1. Android Studio asked me to update my Gradle version (which he didn't before)

    2. 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.

    0 讨论(0)
提交回复
热议问题