Android Studio Error Installing Gradle

Android Studio error installing Gradle

Please read the log from:

  • 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 tmp download path of gradle-1.6-bin.zip. For example, mine is:

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 cause: 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/

Everything is OK now.

Manually install Gradle and use it in Android Studio

Android Studio will automatically use the Gradle wrapper and pull the correct version of Gradle rather than use a locally installed version. If you wish to use a new version of Gradle, you can change the version used by studio. Beneath your Android Studio's project tree, open the file gradle/wrapper/gradle-wrapper.properties. Change this entry:

distributionUrl=http\://services.gradle.org/distributions/gradle-2.1-all.zip

I have encountered these errors in android studio?

Installing Android Studio is a messy thing in windows. Multiple modules are installed in multiple folders in cdrive.

So, removing android studio completely is a messy thing.

  1. For the 1st error, you can download the respective gradle zip file and save it in .gradle folder inside C:/Users/username/. But this will not work with newer android versions.

  2. For the 2nd error, you should delete a file named 'disabled_plugins.txt' which will be found inside C:/Users/username/AppData/Roaming/Google/AndroidStudioxyz.v
    The same file is also found in Local/Google/AndroidStudioxyz.v also.
    So, deleting these files will solve this error.

But, a better way to resolve both the errors is to remove and reinstall Android studio from scratch.
To remove android studio, make sure to remove any folder having the name Android in the following folders:

  1. C:/Users/username/. Here delete .android & .gradle folders. Do not delete AndroidStudioProjects folder, because your projects will be deleted.
  2. C:/Users/username/AppData/Roaming/Google/.
  3. C:/Users/username/AppData/Local/Google/
  4. C:/Program Files/Android
  5. C:/Microsoft/ not must to delete.

Now install your android studio again.

Thank you!



Related Topics



Leave a reply



Submit