0

OS : Windows 7 I am getting "Android SDK not found" error in cordova, I have added environment variable "ANDROID_HOME" in user variable section

C:\Users\KDN\AppData\Local\Android\sdk

and also added "tools" and "platform-tools" in PATH in System variable section

C:\Users\KDN\AppData\Local\Android\sdk\tools
C:\Users\KDN\AppData\Local\Android\sdk\platform-tools

after setting this variables, when I type android in command prompt

C:\Users\KDN>android

I get following result

**************************************************************************
The "android" command is deprecated.
For manual SDK, AVD, and project management, please use Android Studio.
For command-line tools, use tools\bin\sdkmanager.bat
and tools\bin\avdmanager.bat
**************************************************************************

Invalid or unsupported command ""

Supported commands are:
android list target
android list avd
android list device
android create avd
android move avd
android delete avd
android list sdk
android update sdk

but still when I try to execute

cordova build android

I get following error

Android SDK not found. Make sure that it is installed. If it is not at the default location, set the ANDROID_HOME environment variable.

I am using android version 5.1.1 in cordova and same is installed in SDK too.

KDN
  • 33
  • 1
  • 6
  • I have just successfully build the project with android version 6.0, but again I tried it with android version 5.1.1 and 5.0 it gives me same error, so I think problem reside in cordova android version 5.1.1 and 5.0 – KDN Apr 22 '19 at 19:39

1 Answers1

0

check this link Cordova: Android SDK not found. Make sure that it is installed. If it is not at the default location, set the ANDROID_HOME environment variable

If not working try to reinstall again.. sometime it doesn't take the values

RR_Pradhan
  • 78
  • 12