Unable to add android platform in windows 8


#1

I am trying to use ionic in windows 8. But I am getting error adding android platform. Please check the image.

Can you please help me in this?

Regards,
Naveen


#2

Well the reason is right there on the screenshot. It seems you haven’t installed the JDK (you can get it from the oracle site). Without the JDK you probably didn’t install the Android SDK either. Have a look at the platform guide from the cordova docs. All requirements are listed there.


#3

Hi,

Thanks for the quick response. I have installed the latest versions of JDK, JRE & Android SDKs. Could there be any other reason?

Regards,
Naveen


#4

The environment variables are not set (JAVA_HOME in your case). See this stack overflow question. You can set the environment variables in the windows control panel. Be aware, that you have to close the console window after changing them, since they are loaded only during the start of the console application.


#5

Thank you once again. I have set JAVA_HOME variable but still I am getting some errors. Can you please help?

Regards,
Naveen


#6

You need to do the same thing for ant. Install it and add it to your path !


#7

I have done that for ANT too. But still I have errors. Can you please help?

Regards,
Naveen


#8

A Google search tells it’s probably a ant problem again but it’s weird that the error is different.

You can still check if ant is working :

ant -h

Also, you have to include the apache-ant/bin directory in the path. (don’t forget to unlog/log in)

Can’t really help much more :confused:


#9

Hi,

Thanks for the help. Looks like I have crossed all errors. But there is a last problem I guess. When I run android emulator, I am getting stuck at the below image. Can you please help?

Regards,
Naveen


#10

Does it work with a real device? The emulator is slow as hell anyway. On my dev system the emulator fails to start, but deployments to a real device are just fine.


#11

Thank you for your support. Yes, it works with real device.

Regards,
Naveen


#12

Hi,

I am trying test tabs app by developing multiple times with various features. But the build is replacing old apps on real device. May I know how I can overcome this?

Regards,
Naveen


#13

You can change the id in config.xml and it should work. I don’t know if there’s a better way to do it though. Like this, with org.apache.apptest as my app id :

<widget id="org.apache.apptest" version="0.9.3" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">

(And I don’t use the Android emulator so I can’t help you sorry)


#14

Thank you. That works :smile: