ANDROID SDK ROOT undefined recommended setting while building ionic app using Cordova for Android device

0 votes

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)
ANDROID_HOME=C:\Users\tanmay\AppData\Local\Android\sdk (DEPRECATED)
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.

Sep 21, 2022 in Android by Edureka
• 13,620 points

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Android

0 votes
1 answer
0 votes
0 answers
0 votes
0 answers

Android: why the ICICI iMobile Pay App shows the "rooted/jailbroken" device with my app?

The ICICI iMobile Pay app displays the ...READ MORE

Nov 9, 2022 in Android by Edureka
• 12,690 points
0 votes
0 answers

Android app rejected by Google Play Console due to "Provide instructions for app access"

I'm creating an app whose login process ...READ MORE

Nov 22, 2022 in Android by Edureka
• 12,690 points
0 votes
0 answers

How to open WhatsApp using an Intent in your Android App?

I want an Intent to take control ...READ MORE

Nov 23, 2022 in Android by Ashwini
• 5,430 points
0 votes