Android is not recognized as an internal or external command - path variable
Solution 1
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
Solution 2
Find android.bat on your system. On mine (win 8 x64) it's under C:\Users\{username}\AppData\Local\Android\sdk\tools\android.bat
Open a command console, and use the 'doskey' command:
doskey android=C:\Users\{username}\AppData\Local\Android\sdk\tools\android.bat $*
This will continue to work in the command console you executed the doskey command in. To make it permanent is more difficult: http://darkforge.blogspot.com/2010/08/permanent-windows-command-line-aliases.html
Admin
Updated on June 28, 2022Comments
-
Admin almost 2 years
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!
-
wordsforthewise over 8 yearsI had the same problem as the OP but without cygwin installed.