机器人'不被识别为内部或外部的命令不被、机器人、命令

2023-09-12 10:00:55 作者:别捏我肥脸

我想获得新的GCM服务,为我工作,所以我一直在关注这里描述的演示:http://developer.android.com/guide/google/gcm/demo.html

I'm trying to get the new GCM service to work for me, so I've been following the demo as described here: http://developer.android.com/guide/google/gcm/demo.html

到目前为止,一切正常。不过,我应该建立现在使用命令行的蚂蚁文件,而这也正是事情停止工作。

So far, everything works well. However, I'm supposed to build the ant files using the command line now, and that's where things stop working.

由于某些原因,此命令 $ Android的更新项目--name GCMDemo -p。 --target的android-16 给了我一个非常好的

For some reason, this command $ android update project --name GCMDemo -p . --target android-16 gives me a very nice

'android' is not recognized as an internal or external command,
operable program or batch file.

通常,这可以很容易地用一个快速谷歌搜索固定的,但我还没有发现这个问题一个其他用户。有人能告诉我是什么问题? 我的猜测是,我需要到Android工具文件夹添加到我的 PATH ,但我宁愿请务必先。

Normally this can be fixed easily with a quick Google search, but I haven't found a single other user with this problem. Could someone tell me what the problem is? My educated guess is that I need to add the Android tools folder to my PATH, but I'd rather be sure first.

推荐答案

你的猜测是正确的,只是含android.bat(工具文件夹)的文件夹添加到PATH。否则系统将不能找到该程序

Your guess is correct, just add the folder containing android.bat(tools folder) to the PATH. Otherwise the system will not be able to find the program.

另一种可能性是改变目录(使用cd)到Tools文件夹,并从那里执行命令。由于当前目录(不管它是什么),通常是在PATH,系统就会找到它。但是,这不是很方便,因为你经常要执行此命令在不同的目录之中。

Other possibility is change directory (using cd) to the tools folder, and execute the command from there. Since the current directory (whatever it is) is usually in the PATH, the system will find it. But this is not handy, because you frequently want to execute this command being in a different directory.