Android target: Not installed


#1

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?


#2

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


#3

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


#4

Is your android studio is in running condition ?


#5

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


#6

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


#7

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


#8

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.


#9

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



#10

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.


#11

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
OS:
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?


#12

cordova-android is not the Android version. See here for what API levels of cordova-android are: https://cordova.apache.org/docs/en/7.x/guide/platforms/android/index.html (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)


#13

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).


#14

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


#15

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


#16

From the screenshots I think you are on Windows, so follow this link: https://github.com/coreybutler/nvm-windows This is additional software that manages your node installations.


#17

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

but when I do ionic run android

This error shown. The command change?


#18

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


#19

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?


#20

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

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