When I create a new project I finish the steps and click on "finish" and wait for the project to open. But instead I see an error:
I can't solve this problem.
I had this issue after importing a github project into Android Studio using the File > Import Project
option. Network was fine and I had other Android Studio projects working properly so this was not a installation issue. I run Android Studio (Preview) 0.5.4
I had the luxury of comparing differences with working projects. That is how I discovered the error was due to the distributionUrl
property in the gradle/wrapper/gradle-wrapper.properties
file.
In the failing project this was set like distributionUrl=http\://services.gradle.org/distributions/gradle-1.10-all.zip
. While in the working project this was distributionUrl=http\://services.gradle.org/distributions/gradle-1.11-all.zip
. Note the difference in the version.
Updating this distributionUrl in gradle-wrapper.properties to this 1.11 link solved the issue for me.
I have this issue on a very restricted network and I can see that the gradle-1.10 link does point to a zip file. The network issue sounds very plausible to. Probably I already have the 1.11 zip downloaded while on another network. I's less likely (though not impossible) that the 1.10 zip is broken.
Android Studio error installing Gradle
Your situation may be like this one. Just redownload the right gradle-1.x.zip, and replace the bad one on ~/.gradle/wrapper/dists/gradle-1.x/[hash code]/
and the restart the android-studio
Note: ~/.gradle/
is where the directory may be found on unixoid operating systems (e.g. Linux, OS X, ...). On Windows it's typically at C:/Users/[NAME]/.gradle/
.
You can erase the existing gradle zip file, then download the appropriate one from Link https://gradle.org/releases/, and copy the new one (basically replace the existing one, mine was cc 5 MB, with new one cc 80 MB). Then reload Studio, and wait.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With