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

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

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


当前回答

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

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

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

其他回答

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

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

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

如果你在android-sdk-macosx/platform-tools/文件夹中没有adb,你应该先安装平台工具。运行android- SDK -macosx/tools/android,从android SDK管理器中安装平台工具。

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.

你需要先安装adb, 新命令(2021年)为:

Brew install -cask android-platform-tools

为了避免每次启动终端时重写$PATH变量,请在主目录(~/)下编辑.bash_profile(对于mac,它只是.profile)文件,并将导出语句放置在文件中的某个位置。

现在每次你启动终端,你的$PATH变量将被正确更新。要在修改概要文件后立即更新终端环境,请输入:

source ~/.profile