How do I resolve this ERROR starting one or more platforms when I run "ionic start android-device"
$ 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 worked fine, but when I updated my android studio another SDK was installed there. Now I have two SDKs on the ANDROID_HOME path - these are SDK and SDK1. The SDK has API23 and SDK1 API24. whenever I run the "ionic start android -device" command, the terminal always shows this error that I mentioned above.
Before updating Android Studio, everything worked as expected, but after updating, I cannot run the ionic app on my mobile device. Path to: USROID_HOME: C: \ Users \ user \ AppData \ Local \ Android \ sdk; and I have SDK1 folder also after Android Studios update at this location.
AVD Manager.exe and SDK Manager.exe these files are found only in SDK and SDK1, which have nothing of the kind. Please help me with this .
Anyone tell me what the platform can work through the SDK manager?
source to share
You need to update your android platform. Basically an older version before 6.2.0 used a command android
that was deprecated in the SDK. This was fixed in 6.2.0
Check this answer for more information.
First update your cli cord:
npm install -g cordova@latest
You can upgrade to the latest platform by following these steps:
ionic platform add android@6.2.3
Or
ionic platform add android@latest
For IONIC CLI v3 command:
ionic cordova platform add android@latest
source to share