1
votes

I just install android studio on a VM machine (VM Fusion). When I try to create a new project, I get the message "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'." I followed the suggestion found in the page.

  1. Download Gradle directly from http://services.gradle.org/distributions/gradle-1.6-bin.zip

  2. Copy the contents of gradle-1.6 to \Android\android-studio\plugins\gradle

  3. Copy gradle.jar to \Android\android-studio\lib\

  4. Restart Android Studio

It did not work. I get the error message I tried to copy the zip package /gradle-1.6-bin.zip to the following location

C:\Documents and Settings\myusername.gradle\wrapper\dists\gradle-1.6-bin\72srdo3a5eb3bic159kar72vok\

the .gradle file was not there. I look in setting and notice that it under \vmware-host\sharefolders. I went there and the file was still not there. I unhide hidden file and folder with no luck. In addition, when I create a new project, I notice the project location is \vmware-host\Shared Folders\AndroidStudioProjects\MyApplicationProject. How can I get a new .gradle file or tell android studio to look at a different folder? How do I change the project location so it does not default to \vmware-host but instead to c:\development. Any kind of help would be greatly appreciated.

Thanks, JF

3

3 Answers

3
votes

Copying Gradle inside Studio will not help. Just install it somewhere else and after manually creating a project you can import it in Studio and select which installation of Gradle to use.

You have to create the project manually, because right now creating a project from studio always use the wrapper that automatically download gradle from the online repository.

We are working on having an offline mode for project creation, but it's not available yet.

2
votes

Just edit your System's DNS settings, and redirect services.gradle.com to 127.0.0.1 then use a small web server and serve the file under its appropriate directory (distributions)

0
votes

As you said,"Copy the contents of gradle-1.6 to \Android\android-studio\plugins\gradle",this folder under the setup path. Why did you copy it to "Documents and Settings"?