I’m getting the following error when trying to run
ionic emulate android:
Error: Please install Android target: “android-22”.
I’ve installed the Java SDK and I’ve also installed the Android SDK - including various images for testing and also Android 2.2 API using the Android SDK Manager (looks like this)
Any ideas what else could be wrong please?
Do you have the “Android SDK Build tools” installed? (version 22.0.1 of course).
Thank you for the replies guys, I’m using Windows 7 and I think I have the correct Android SDK Build Tools installed:
I’m going to try some different installation combinations now, but it’s tricky because my Android folder is already around 10GB and I’m out of space on the hard drive
Also, in my /platforms/platforms.json file it says this:
I’ve changed it to
But still get the same problem
Also checked and it says:
In both /platforms/android/project.properties and /platforms/android/CordovaLib/project.properties
Should I change that to something else?
Sorry to bump this, but any ideas please? I still can’t get it working
First, install Android 5.1.1 (API 22) package then try building for Android platform.
If you do not have enough space in hard disk, then you can remove Android 6.0 (API 23).
Thank you @sandips! I’m sorry if this is a silly question but which ones exactly do I need to install?
Please install these
- Tool -> Android SDK Build-tools (22 and above)
- Android 5.1.1 (API 22) -> SDK Platform, Google APIs and Source for Android SDK
Remove the android platform from Ionic project and add it again.
Thank you so much @sandips! Managed to progress a little further, I’ve downloaded what you suggested, created a virtual machine but now I get this error and the virtual machine doesn’t load:
Created filesystem with 11/4224 inodes and 1302/16896 blocks
emulator: ERROR: x86 emulation currently requires hardware acceleration!
Please ensure Intel HAXM is properly installed and usable.
CPU acceleration status: HAXM is not installed on this machine
Sorry to be a pain but any ideas please? I have installed the HAXM accelerator in the SDK manager under ‘extras’ but I still get the same error unfortunately.
Please remove the previous emulators (virtual devices), if any exists and create ARM based emulator. You should be able to run the emulator now.
Enable hardware acceleration related settings in BIOS and install HAXM.