Resolve! Could not find an installed version of Gradle either in Android Studio,

During installation and adding the Android platform to your Ionic application you may face the following issue in your terminal window:

[cordova] Could not find an installed version of Gradle either in Android Studio,
[cordova] or on your system to install the gradle wrapper. Please include gradle
[cordova] in your path, or install Android Studio
[ERROR] An error occurred while running subprocess cordova.

cordova.cmd build android exited with exit code 1.

Re-running this command with the --verbose flag may provide more information.

How to resolve this issue?

You need to install/ Download the Gradle setup and add it in your Environment Variables. Just follow these steps:

Step 1) Download Gradle files

Go to the Gradle release page and download the latest zip file. Which reads like gradle-6.2-bin.zip

Step 2) Extract this file and place in

C:\Gradle\gradle-6.2

 

Step 3) Copy path then add in Environment Variables

Open Environment Variables then add step 2 bin path to it.

That’s it now reopen terminal window to run Ionic commands to create productions files

Leave a Comment

Your email address will not be published. Required fields are marked *