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

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

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


当前回答

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.

其他回答

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

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

or

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

我使用的是Mac 10.11.1和android studio 1.5, 我有adb “/用户/用户名/图书馆/ Android / sdk /平台工具”

现在编辑bash_profile

emacs ~/.bash_profile

将这一行添加到bash_profile中,并将user-name替换为您的用户名

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

保存并关闭。 运行此命令重新加载bash_profile

source ~/.bash_profile

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

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

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

我通过安装adb包解决了这个问题。我用的是Ubuntu。

sudo apt install adb

我想这对你有帮助。