But I can’t find how to run ionic run android
command.
It seems the command is no longer be used in new CLI
This is the same picture you posted above:
The picture above is after run ionic cordova --help
This one I runionic cordova run android
but it return the same error. Adroid SDK not found
cordova requirements
Yeah but now you are (hopefully) on current software versions: Post your ionic info
again.
(Probably you still have to upgrade cordova
to a current version: npm uninstall -g cordova
, then npm install -g cordova
)
Then you can remove the android platform and re-add it to get a current cordova-android - and MAYBE that will then work with your Android setup. Remove all the Android stuff (also env vars etc), install Android Studio again as this should do it automatically.
Besides, is with new CLI,ionic run android
change to ionic cordova run android
?
Your cordova android platform is still old.
Run ionic cordova platform remove android
and the ionic cordova platform add android
to re-add it again.
Also run cordova requirements
again now you have the newest version. If it still doesn’t like your Android, reinstall everything by removing it and just installing Android Studio.
what is the cordova platforms : android 5.1.1 browser 4.1.0 mean?
Can it still debug my code in SDK android 4.1 after upgrade?
Yes, there is “Cordova Platforms” in front of it.
Yes, Android 4.1 is still supported by cordova-android 6.x
cordova platform upgarde to version 6. Now the error change to could not find an installed version of Gradle
Yay, that looks good and current now!
Now you only have to to what it says in the error message here and cordova requirements
.
It looks a bit different now but now the android target still not installed although the message is different.
Also, how to install gradle? It said it is not installed.
Google for “Gradle”, download and install it.
Also: Just install Android Studio. I said x times already.
We are 33 messages in this discussion now and you show absolutely no effort in fixing this. I will stop answering now. Good luck.
I have the android Studio already prior that. I check my Gradle is version 3.2 but it just does not detect by the system.
I am not sure this is due to I installed the android studio in Drive D.
Thanks for your help
I also faced such type of problem where everything is correct . And I tried to use SDK API 22 and Android version 5.1 with following settings
SDK 22 already installed . Then build process trying to install SDK 25.
I tried everything but finally I accepted all SDK licence then its worked fine.
try to update your platform to 6.2.3,
cordova platform update android@6.2.3
I have the same issue when I try to use Android SDK version 25, it said not SDK installed, but when I upgrade from @6.2.2 to @6.2.3, it worked.
Even you want to use lower version SDK, such as 22, you can try it. Because cordova-android Version 6.. supports Android SDK(API) 16-25
Good luck