- a useful solution for those who encounter this error
I had this error and it related to path variables. I thought everything was set up correctly, but I didn’t have a part.
First check by entering the android command on the command line. If the SDK is not open, you did not set the variables and / or the path correctly.
You should have 3 (or 4 if you have separate androids).
ANT_HOME, JAVA_HOME and ANDROID_HOME
ANDROID_HOME must point to sdk. If you (for example, me) downloaded a package that includes eclipse, you need this variable to point to the sdk folder inside the Android package folder, and not to the android folder itself (for example, C: \ Dev \ adt-bundle-windows \ SDK )
You need to add %ANDROID_HOME%\tools and %ANDROID_HOME%\platform-tools to your path. Along with a link to the ANT bin and jdk bin .
I strongly recommend that you triple check that all variables are set correctly And that all four parts are added to the path.
source share