user2447501 user2447501 -4 years ago 183
Android Question

Android is not recognized as an internal or external command - path variable

I'm having precisely the same issue as this person:

android' is not recognized as an internal or external command

However, I have also set the PATH environment variable (Windows 7) as recommended in the answer to the above post. In particular, I have:

C:\Users\p\AppData\Local\Android\android-sdk\tools

and

C:\Users\p\AppData\Local\Android\android-sdk\platform-tools

In addition, I have set %ANT_HOME%\bin and %JAVA_HOME%\bin. I have checked that the android.bat is indeed in the tools directory pointed to, that the PATHEXT variable contains ".bat", and I have restarted the command prompt. And yet 'android' is not recognized.

Does anyone have an idea what might be the problem? Many thanks in advance!

Answer Source

I do not know what causes the issue with the path variable.

However, the workaround I've used is to move to the "tools" directory and call android from there; I've added "--path " to point to the directory in which the project resides.

Details on how to manage android projects from the command line can be found here:

http://developer.android.com/tools/projects/projects-cmdline.html

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download