I'm attempting to use Cordova and the command from VSCode below to create an ionic app for an Android smartphone.
ionic cordova build android --prod --release
But I'm getting this error:
cordova.cmd build android --release
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=undefined (recommended setting)
Could not find an installed version of Gradle either in Android Studio,
or on your system to install the gradle wrapper. Please include gradle
in your path, or install Android Studio
[ERROR] An error occurred while running subprocess cordova.
cordova.cmd build android --release exited with exit code 1.
JDK and Android Studio are both already installed. I also put the appropriate SDK path in the environment variable ANDROID SDK ROOT. But no luck thus far.
I'm running Windows 10 and Android Studio 3.6.1, Gradle 6.3, and Cordova 8.1.
I suppose I'm missing the ANDROID SDK ROOT setting someplace, but I'm not sure where.