-bash:机器人:命令不能在Mac OSX发现能在、机器人、命令、发现

2023-09-05 05:42:50 作者:人山人海越走越孤独

我已经潜入Android开发了一段时间,现在我想用一些项目(helpshift)在我的应用程序。在网站上,他们有一些例如应用中自述说:运行/ HelpshiftDemo文件夹内的以下

I've been diving into Android development for a while, and now I want to use some project (helpshift) in my app. On the website they have some example apps in which the readme says: Run the following inside the /HelpshiftDemo folder.

android update project -t android-17 -p .

所以,我这样做,但不幸的是这给了我一个错误说 -bash:机器人:找不到命令。我理解这一点,因为机器人本身并不是指在我的笔记本电脑(Mac OSX版)东西。所以,我认为这是有可能指的是亚洲开发银行。所以,我想替换机器人的直接路径,以我的亚行:

So I do this, but unfortunately this gives me an error saying -bash: android: command not found. I understand this, because "android" as such doesn't refer to anything on my laptop (Mac OSX). So I thought it is maybe referring to the adb. So I tried replacing android for the direct path to my adb:

/Users/kramer65/dev/adt-bundle-mac-x86_64-20130917/sdk/platform-tools/adb update project -t android-17 -p .

这使我对亚行的详细信息,这是我想不是预期的结果,一个巨大的输出。

This gives me a humongous output with more information on adb, which is I guess not the expected result.

所以我的问题;是什么机器人指,我怎么能解决这个问题在Mac OSX?

So my questions; what does android refer to, and how can I fix this on Mac OSX?

推荐答案

机器人工具位于工具在你的SDK目录。你需要把它添加到您的 PATH 环境变量,使Bash可以识别它。

The android tool is located in the tools directory in your SDK. You need to add this to your PATH environment variable so that bash can recognize it.

您可以将它添加到你的的.bash_profile 文件路径做到这一点。该文件应位于你的主目录。创建,如果它不存在,使用 VI的.bash_profile 并添加以下行:

You can do this by adding it to your PATH in your .bash_profile file. This file should be located in your home directory. Create if it doesn't exist using vi .bash_profile and add the following line to it:

export PATH=<path_to_android_sdk>/platform-tools:<path_to_android_sdk>/tools:$PATH

其中,&LT; path_to_android_sdk&GT; 将被替换的路径SDK。例如:/用户/我/ Android的SDK-mac_86 /平台工具

where <path_to_android_sdk> is to be replaced with the path to your SDK. For example: "/Users/me/android-sdk-mac_86/platform-tools"