How to set gradle home while importing existing project in Android studio. While trying to import I need to set up this path.
If you are on a Windows machine, go to the directory:
C:\Program Files\Android\Android Studio\gradle\
Click the gradle-4.4 folder from Android Studio\File\Settings, and then click the Apply button.
OSX (Less han two minutes)
gradle --version
, if so, goto step 4brew install gradle
and Goto step 2/usr/local/opt/gradle/libexec/
For migrating from eclipse to android studio
(Do not need to specify the Gradle home.)
Try this for windows users
http://blog.blundell-apps.com/setting-up-android-studio-gradle-windows-7/
For OSX, if going to Finder, navigate to this category: /usr/local/opt/ if you do not see gradle folder, install your grandle version manually:
https://services.gradle.org/distributions/gradle-5.4.1-all.zip
https://services.gradle.org/distributions/gradle-4.4.1-all.zip
If you are looking for specific Gradle version, simply change the version number from the zip links above, unzip and add that in the Gradle folder /usr/local/opt/gradle
This is my solution on AndroidStudio/Idea for Mac
$ env | grep GRADLE
GRADLE_HOME=/usr/local/Cellar/gradle/2.6
GRADLE_USER_HOME=/Users/leon/.gradle
If you are on a Windows machine, gradle home is located inside the installation folder of your Android Studio, usually at:
C:\Program Files\Android\Android Studio\gradle\gradle-5.1.1
Change the version if you have a different one.