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.
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.
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:
- C:/Users/username/. Here delete .android & .gradle folders. Do not delete AndroidStudioProjects folder, because your projects will be deleted.
- C:/Users/username/AppData/Roaming/Google/.
- C:/Users/username/AppData/Local/Google/
- C:/Program Files/Android
- C:/Microsoft/ not must to delete.
Now install your android studio again.
Thank you!
Related Topics
How to Make Sticky Headers in Recyclerview? (Without External Lib)
How to Detect the Swipe Left or Right in Android
Admob Error in Eclipse for Android:Configchanges
Navigation Drawer: How to Set the Selected Item at Startup
How to Get an Android Wakelock to Work
How to Use Both Ontouch and Onclick for an Imagebutton
Upload Photo to Facebook with Facebook Android Sdk in Android
Lost My Keystore for Uploaded App on Android Market
Scrollable Content Inside an HTML Does Not Scroll in Android Emulator or Phone
Android Canvas: Draw Transparent Circle on Image
How to Use Icons and Symbols from "Font Awesome" on Native Android Application
How to Shrink Code - 65K Method Limit in Dex
How to Pause/Resume Thread in Android
Call Method When Home Button Pressed
Edittext: Disable Paste/Replace Menu Pop-Up on Text Selection Handler Click Event
Preferencefragmentcompat Requires Preferencetheme to Be Set
Should Have Subtitle Controller Already Set Mediaplayer Error Android