I\'m using Android Studio. How can I manually install and use Gradle within Android Studio.
I\'ve downloaded Gradle from http
(There are 2 solutions mentioned in existing answers that might work, but the preferred one - manually download gradle for gradlew, is lack of essential details, and cause it fail. So, I would add a summary with missing details to save the unnecessary time wasted, in case others encounter into the same issue.)
There are 2 possible solutions:
Solution A: Use location gradle, and delete gradlew related files. (not recommend)
Refer to this answer from this post: https://stackoverflow.com/a/29198101/
Tips:
Solution B: Download gradle distribution manually for gradlew. (recommended)
Android Studio will download gradle to sub dir named by a hash.
To download manually, need to download to the exact sub dir named by the hash.
Steps:
.gradle/wrapper/dists/gradle-4.10.1-all/455itskqi2qtf0v2sja68alqd/ps -aux grep | android.gradle/wrapper/dists/gradle-4.10.1-all/455itskqi2qtf0v2sja68alqd/gradle-4.10.1-all.zip.part*.part file..gradle/wrapper/dists/gradle-4.10.1-all/455itskqi2qtf0v2sja68alqd/gradle-4.10.1-all.zipAndroid Studio and try again.
.gradle/wrapper/dists/gradle-4.10.1-all/455itskqi2qtf0v2sja68alqd/gradle-4.10.1/Tips:
Android Studio & creating blank project again, if you see it says waiting for other process to download the distribution.Android Studio might use different gradle version, thus might need to repeat this process once, when Android Studio is upgraded.BTW:
Here is the dir layout on my Linux
(For Android Studio 3.3.1, which use gradle 4.10.1)
eric@eric-pc:~/.gradle/wrapper$ tree -L 4
.
└── dists
└── gradle-4.10.1-all
└── 455itskqi2qtf0v2sja68alqd
├── gradle-4.10.1
├── gradle-4.10.1-all.zip
├── gradle-4.10.1-all.zip.lck
└── gradle-4.10.1-all.zip.ok
Suggestions to Android-Studio
Android Studio.gradle installation dir or .zip file to be used by gradlew.