Install Android Studio Gradle

When I try to create a project in Android Studio, I get this error:

Compilation completed with 1 error and 0 warnings in 9 sec 1 error 0 warnings org.gradle.tooling.GradleConnectionException: Could not install Gradle distribution from 'http://services.gradle.org/distributions/gradle-1.6-bin.zip'.: Could not install Gradle distribution from 'http://services.gradle.org/distributions/gradle-1.6-bin.zip'. 

What can I do to fix this?

UPDATE:

When I look at the error log, I saw this:

 org.jetbrains.plugins.gradle.settings.GradleSettings cannot be cast to org.jetbrains.plugins.gradle.settings.GradleSettings: org.jetbrains.plugins.gradle.settings.GradleSettings cannot be cast to org.jetbrains.plugins.gradle.settings.GradleSettings 
+47
android android-studio gradle
May 16 '13 at 11:09
source share
14 answers

Please read the magazine:

  • On Microsoft Windows: [Windwos Drive]\Documents and Settings\[your username]\.AndroidStudioPreview\system\log
  • On Mac and Linux: ~/.AndroidStudioPreview/system/log/

And you will find the download path tmp gradle-1.6-bin.zip . For example, mine:

 2013-05-17 09:42:16,934 [ 283002] INFO - ution.rmi.RemoteProcessSupport - Unzipping C:\Documents and Settings\Kiki.J.Hu\.gradle\wrapper\dists\gradle-1.6-bin\72srdo3a5eb3bic159kar72vok\gradle-1.6-bin.zip to C:\Documents and Settings\Kiki.J.Hu\.gradle\wrapper\dists\gradle-1.6-bin\72srdo3a5eb3bic159kar72vok ... Caused by: com.intellij.openapi.externalSystem.model.ExternalSystemException: Could not install Gradle distribution from 'http://services.gradle.org/distributions/gradle-1.6-bin.zip'. java.util.zip.ZipException: error in opening zip file 

So, I know the reason: I downloaded an incomplete ZIP package.
Then I downloaded the full ZIP package from http://services.gradle.org/distributions/gradle-1.6-bin.zip manually and copied this ZIP package to:

  • Windows: C:\Documents and Settings\Kiki.J.Hu\.gradle\wrapper\dists\gradle-1.6-bin\72srdo3a5eb3bic159kar72vok\
  • Mac OS X: ~/.gradle/wrapper/dists/gradle-1.10-all/6vpvhqu0efs1fqmqr2decq1v12/

Now everything is all right.

+67
May 17 '13 at 1:59
source share

For OS X:

Install Homebrew as a package manager. Then on Terminal run:

 ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)" 

Install Gradle :

 brew install gradle 

This is the easiest way to get Gradle.

+8
Jul 02 '13 at 16:55
source share

Before moving on to a new project, go on to configure and configure your proxy. I recommend setting the host name and port number, as I had problems with the proxy settings with automatic detection. Check the connection in the settings.

+2
May 16 '13 at 12:07
source share

I also had problems downloading Gradle via Android Studio.

That was my way:

Hope this helps!

+2
May 16 '13 at 14:17
source share

In my case, this was because the system had low memory. When I closed some applications, the error disappeared.

+2
Sep 10 '13 at 23:30
source share

Change the gradle shell settings in gradle/wrapper/gradle-wrapper.properties and change gradle -1.6-bin.zip to gradle -1.8-bin.zip.

./gradle/wrapper/gradle -wrapper.properties:

 #Wed Apr 10 15:27:10 PDT 2013 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip 

Now it should compile without any errors.

+2
Oct 26 '13 at 1:26
source share

For me, it turned out to be my firewall, which VIPRE blocked the Gradle.org website and calmly caused Bad gradle-1.7-bin.zip be created under .gradle\wrapper\dists\ .

I had to open VIPRE and add Gradle.org to the “Bad Web Site Exceptions” (menu File → Settings → Firewall).

Then I downloaded http://services.gradle.org/distributions/gradle-1.7-bin.zip using a browser and overwrite the bad version. I restarted Android Studio and everything is fine.

+1
Aug 29 '13 at 15:59 on
source share

FYI, on my Mac, it downloaded Gradle into the ~/.gradle . You can see how it progresses by looking there:

 du ~/.gradle 
+1
Sep 12 '13 at 6:18
source share

I noticed that my MyProject/gradle/wrapper/gradle-wrapper.properties was completely empty, so I deleted it and Android Studio continued to download everything that it needed.

After that he worked.

+1
Apr 15 '15 at 16:34
source share

I tried the Kiki Hu solution and it worked. After that, more downloads will be added from the Maven repository, which includes the Dalvik Debug Monitor Server (DDMS), Guava , etc. Which again is not required if you export from Eclipse to Android Studio.

0
May 18 '13 at 5:24
source share

If you are like me, you tried to run the version prior to 0.2.0. After Google’s notes in Getting Started with Android Studio , you will need to uninstall and reinstall Android Studio.

" Note . An update with an update fix is ​​available from 0.1.9 to 0.2. To upgrade from Android Studio 0.1.x to 0.2.x, you need to install a new Android Studio package from this. The reason is that we made changes to the SDK, which includes "pre-configured local Maven repository, which can serve the v4 support library and which is required to create new projects."

Also keep in mind that if you have Android SDK files stored in C:\Program Files (x86)\Android\android-studio\sdk , you must transfer them before deleting, or you will need to download the SDK files again.

After installing and reinstalling, it now works on my 64-bit Windows system. n / s.

0
Jul 12 '13 at 4:56
source share

Delete all files from C:\Documents and Settings\[User]\.gradle\wrapper\dists\ , rebuild the project and rebuild the project in Android Studio. This works for me :)

0
Jul 23 '13 at 3:46
source share

I noticed one thing: when my Android studio is built on 130.737825, it automatically loads Gradle from 1.6 to C:\Users\yourname\.gradle/wrapper/dists/gradle-1.6-bin/72srdo3a5eb3bic159kar72vok/ .

However, when I update my Android Studio to build 132.821530, it automatically loads Gradle from 1.7 to C:\Users\Administrator\.gradle\wrapper\dists\gradle-1.7-bin\2g3i7gan25uopmtc0lnjb1l9ff .

I do not know if this matters.

0
Oct 07 '13 at 1:48 on
source share

I had this error on a new installation of IntelliJ (14.0), the problem is that I did not specify the JDK. Fix: press ctrl + A + S (project structure) and check if the SDK is correct.

my error looked like this:

Error: Android Gradle Build Target: org.gradle.tooling.GradleConnectionException: could not build using Gradle installation ...

0
Nov 14 '14 at 8:21
source share



All Articles