Tuesday, 1 June 2021

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

Long story short, I've tried all sorts of solutions SO and other sites have proposed, and I'm certain none of them handle my scenario. I'm using Cordova to build my apps. I recently reinstalled Cordova, and apps stopped building.

  • Yes, I've installed and included gradle in my path (I'm on Windows)
  • I've verified and gradle is installed (gradle -v) from command prompt
  • When I open the project directly from Android Studio, it finds gradle and builds successfully
  • When I use cordova to run it from the cmd, I get the above error
  • Funny enough, when I delete downloaded files from C:\user\.gradle as some SO and GitHub solutions suggest, it downloads gradle, and after completing the download, still tells me gradle couldn't be foound

I've upgraded Node, NPM and Cordova to their latest versions. If it's of any help, I'm building on Ionic and both Ionic and Angular have been equally upgraded to their latest versions. Ionic serve and every other related command works. Here's the command that triggers the error:

ionic cordova run android


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

No comments:

Post a Comment