3
$ ionic run android --device
Running command: "C:\Program Files\nodejs\node.exe" C:\Users\user\Desktop\transroads\jvdappNew\jvdApp\hooks\after_prepare\010_add_platform_class.js C:/Users/user/Desktop/transroads/jvdappNew/jvdApp
add to body class: platform-android
ERROR running one or more of the platforms: Android SDK not found. Make sure that it is installed. If it is not at the default location, set the ANDROID_HOME environment variable.
You may not have the required environment or OS to run this project.

It was working properly but when i updated my Android Studio there is installed another SDK also now i am having two SDK in the ANDROID_HOME path those are SDK and SDK1. SDK is having API23 and SDK1 API24. whenever i am running command "ionic run android --device" terminal always shows that error i have discuss above.

Before update of Android Studio everything was working properly but after the update i am unable to run ionic application on my mobile device.ANDROID_HOME path is C:\Users\user\AppData\Local\Android\sdk; and i am having SDK1 folder also after the Android Studios updation on that location.

AVD Manager.exe and SDK Manager.exe those files are only in SDK and SDK1 having nothing like that.Please help me out of this.

Anyone please tell me both the platform can run over a SDK Manager?

Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
faizan
  • 61
  • 1
  • 2

1 Answers1

2

You need to update your cordova android platform. Basically the older version till 6.2.0 used android command which is deprecated in the SDK.This was patched in 6.2.0

Check this answer for more info.

Update your cordova cli first:

npm install -g cordova@latest

You can update to the latest platform by doing:

ionic platform add [email protected]

Or

ionic platform add android@latest

For IONIC CLI v3 the command is:

ionic cordova platform add android@latest
Community
  • 1
  • 1
Suraj Rao
  • 29,388
  • 11
  • 94
  • 103