Failed to sync Gradle project 'MyApp' Error:Unknown host 'services.gradle.org'.

 
----------------------------------------------------------------------------
Failed to sync Gradle project 'MyApp'
Error:Unknown host 'services.gradle.org'.
<a href="http://www.gradle.org/docs/current/userguide/userguide_single.html#sec:accessing_the_web_via_a_proxy">
Learn about configuring HTTP proxies in Gradle</a>
----------------------------------------------------------------------------

Android Studio shows this kind of error
if you have moved the project from its defualt place or misplaced the gradle path.

so the simple answer is to replace the project to its defult place or change 
its gradle home path.

>Solution<

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


NOTE: 
in my case my default android studio .gradle folder is located in
"F:/Program Files/Android/Android Studio/gradle/gradle-2.4"
change it with your defualt directory.

Comments

  1. Informative blog. Thank you for sharing with us..
    and also we are providing E-Learning Portal Videos for students and working Professionals
    Hurry Up! Bag All Courses in Rs - 10000 /- + taxes
    41 Career building courses.
    Designed by 33 industrial experts
    600+ hours of video Content
    DevOps and Cloud E-Learning Portal

    ReplyDelete
  2. very informative blog and useful article thank you for sharing with us , keep posting learn more Technology
    Android Online Training

    ReplyDelete

Post a Comment

Popular posts from this blog

Using Roboto font android

Windows 10 Slow Performance issue fixed !!!