Monday, January 21, 2019

Could not find an installed version of Gradle either in Android Studio, or on your system to install the gradle wrapper. Please include gradle


CordovaError: Could not find an installed version of Gradle either in Android Studio,
or on your system to install the gradle wrapper. Please include gradle


To solve this issue you have to install gradle. To install gradle please use below steps -

For debian/ubuntu - If your system is a debian/ubuntu then, in this case, you can use below command on the terminal to install gradle. 
sudo apt-get install gradle


For Mac - If your system is a Mac then follow below steps -  

First, download the gradle binary only distribution with the help of this URL - https://gradle.org/gradle-download/
Now open your system terminal and run the following command to unzip the android sdk into the development directory that is under your user home directory
unzip ~/Downloads/gradle-3.1-bin.zip -d ~/Development

To edit base profile open vi editor. We also need to set GRADLE_HOME environment variable 
vi ~/.bash_profile

To enter in edit mode in vi editor hit i and now add below text to .bash_profile
export GRADLE_HOME=~/Development/gradle-3.1/bin

To exit edit mode press Esc key 
To enter in command mode press : (colon key)

To save changes and exit vi editor type wq and press enter key.

To update changes run the following command 
source ~/.bash_profile

Now test this by running below command in terminal 
echo $GRADLE_HOME

For Windows - If your system is a Windows then follow below steps -   
This is a very long process, Here are some steps for windows. Just follow all steps mentioned on below URL -
http://bryanlor.com/blog/gradle-tutorial-how-install-gradle-windows

No comments:

Post a Comment