Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to import new Gradle project: Could not install Gradle distribution from 'http://services.gradle.org/distributions/gradle-1.6-bin.zip'

When creating project in Android Studio, I am getting the below error message.

Failed to import new Gradle project: Could not install Gradle distribution from 'http://services.gradle.org/distributions/gradle-1.6-bin.zip'.
java.net.ConnectException: Connection timed out: connect
**Connection timed out: connect

Even when I go to [gradle website](http://services.gradle.org /distributions/gradle-1.6-bin.zip) to download gradle manually, it failed to download (timed out).

I cannot download gradle manually and I cannot create new project in android studio.

I checked everywhere before I posted this message with no luck.

My environment:

  • Windows 7 64 bit.
  • java jdk1.7.0_21 64 bit.

I have excellent internet connection, and I also tried from different network, still I am getting the same error message.

Any help is appreciated.

like image 523
dhamen12 Avatar asked Jun 10 '13 10:06

dhamen12


1 Answers

Thank you, I have resolved this problem already. The cause of this error is really surprising. If you try to download Gradle using 3G connection, it will always fail, that is at least in my case. When I connect using DSL connection Android Studio directly start to download Gradle with no problem and I am able to create new project. Now even if I switch back to 3G connection it is still working. So to replicate my scenario, try to download Gradle using 3G connection or install brand new Android Studio installation using 3G connection. I hope this will help someone.

NOTE: My 3G connection speed is better than my DSL connection.

like image 162
dhamen12 Avatar answered Oct 07 '22 00:10

dhamen12