我需要运行一个adb前进命令之前,我可以使用ezkeyboard应用程序,允许用户使用浏览器在手机上输入。

当我运行adb forward tcp:8080 tcp:8080命令时,我得到adb命令not found错误消息。

我可以从终端运行android命令。为什么亚洲开发银行没有发挥作用?


当前回答

在我的Mac (OS X 10.8.5)上,我在这里有adb:

~/Library/android-sdk-mac_86/platform-tools

因此,在.bash_profile中编辑$PATH并对其进行源化。

其他回答

确保adb在用户的$PATH变量中。

or

您可以尝试使用whereis定位它,并使用./adb运行它

UNABLE TO LOCATE ADB #SOLVED Simply Download Sdk platform tools.https://developer.android.com/studio/releases/platform-tools.html Extract the Downloaded file. Go to Sdk Manager in Android Studio and copy the link. Go to file Explorer and paste the path for Sdk you copied to view the Sdk files. You will notice that the Adb file is missing, open downloaded file (platform tools) copy contents and replace every content in your Sdk tool file (the file where you noticed adb is missing)and save. You are good to go.

如果您不想编辑PATH变量,请转到安装SDK的platform-tools目录,该命令就在那里。

你可以这样使用它:

进入你放置SDK的目录: cd /用户/曼苏尔/图书馆/开发/ Android / sdk /平台工具 使用./键入adb命令,以便从当前目录使用它。 ./adb tcpip 5555 .使用实例 亚行。/设备 ./adb连接192.168.XXX.XXX

将以下命令添加到.zshrc文件中

在终端中使用命令-> vi .zshrc打开文件 添加android sdk路径- > exportPATH="/Users/<user>/Library/ android /sdk/platform-tools:$ path "

通过-> Esc +:wq关闭文件

Mac用户只需打开/ users /(USERNAME)/。Bash_profile编辑器中的这个文件。 并添加这一行来添加路径。

export PATH="/Users/myuser/Library/Android/sdk/platform-tools":$PATH

如果通过studio安装adb,这是默认路径。 不要忘记在这一行更改用户名。