Android target: Not installed

I am unable to ionic run android'. After I checked withcordova requirements`, it shows

Android target: Not installed
Android SDK not found.

My ANDROID_HOME has set correctly. Run adb from command prompt is OK.

what should I do?

1 Like

Android_home path should be your sdk path, check it once again.

Download android studio then add this following path

for eg: ANDROID_HOME :- C:\Users\admin\AppData\Local\Android\sdk.

After that add in PATH :- C:\Users\admin\AppData\Local\Android\sdk\tools\bin;C:\Users\admin\AppData\Local\Android\sdk\platform-tools;

Also add JAVA_HOME if not installed

Mine is in D drive
path is same as yours, correct?

Is your android studio is in running condition ?

I did not open it, I just downloaded it. It should work

Running Android Studio is the way to get this fixed. There you can also go into SDK Manager and download the necessary files.

Can you explain further. I have android Studio with me already

No, you said that you “did not open it, I just downloaded it”. Open it, run it, use the SDK Manager inside to make sure you have the stuff you need. The errors you are getting should all be taken care of by installing and using Android Studio.

The Jelly bean is succesfully installed. Also I check cordova-android version for my project

You should upgrade your cordova-android to the current 6.2.3. What is your current Cordova version? Best run ionic info to output all kinds of important information and post it here.

Your system information:

Cordova CLI: 6.1.1
Gulp version: CLI version 3.9.1
Gulp local:
Ionic Framework Version: 1.3.1
Ionic CLI Version: 2.0.0-beta.25
Ionic App Lib Version: 2.0.0-beta.15
Node Version: v5.11.1

What I need is to debug the code in android 4.1 Jelly bean. But from the cordova-android version, seems like the project is build in 5.1.1.
WHat should I do so can I run ionic run android without error in android 4.1?

cordova-android is not the Android version. See here for what API levels of cordova-android are: Android Platform Guide - Apache Cordova (you can use the API level to check which Android versions are supported then)

If you want to test a specific Android version, you just need to use a compatible cordova-android version and do it in an emulator or on a device with that version.

BUT: Your problem is that your system is not configured at all. Your ancient CLI is just not compatible with current Android SDK and Android Studio version.

I think you should upgrade to a current CLI with current App-Scripts:
npm uninstall -g ionic
npm install -g ionic
(Best first switch to a new node version as well, use nvm or nvm-windows so you can have mutliple versions installed at the same time)

Is there any command that use to update the node.js without redwonload it?

I saw this error after upgrade the current CLI

ERR: Your Node.js version is v5.11.1. Please update to the latest Node 6 LTS version (or latest Node).

If you were using nvm there would be. This is one of the reasons why I always suggest using nvm or nvm-windows.

Should I run nvm or nvm-windows and it will upgrade to Node 6 LTS now?

From the screenshots I think you are on Windows, so follow this link: This is additional software that manages your node installations.

I intsall the nvm.
I also reinstall node.js 6 LTS

but when I do ionic run android

This error shown. The command change?

Yes. It says so in the error message and tells you the new command.

but I can not use ionic run android, what is the command that I should use now?
with the new CLI update

Also, when I commit the code after changes to the trunk code, will it affected another developer for the project?

Look at the picture you posted. What does the green text say?

It should not. But check the changes you submit before doing so.