我需要运行一个adb前进命令之前,我可以使用ezkeyboard应用程序,允许用户使用浏览器在手机上输入。
当我运行adb forward tcp:8080 tcp:8080命令时,我得到adb命令not found错误消息。
我可以从终端运行android命令。为什么亚洲开发银行没有发挥作用?
我需要运行一个adb前进命令之前,我可以使用ezkeyboard应用程序,允许用户使用浏览器在手机上输入。
当我运行adb forward tcp:8080 tcp:8080命令时,我得到adb命令not found错误消息。
我可以从终端运行android命令。为什么亚洲开发银行没有发挥作用?
当前回答
你需要先安装adb, 新命令(2021年)为:
Brew install -cask android-platform-tools
其他回答
在我的Mac (OS X 10.8.5)上,我在这里有adb:
~/Library/android-sdk-mac_86/platform-tools
因此,在.bash_profile中编辑$PATH并对其进行源化。
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.
在终端输入以下命令:
nano . bash_profile
并添加以下几行(将USERNAME替换为您自己的用户名)。
export ANDROID_HOME=/Users/USERNAME/Library/Android/sdk
export PATH=${PATH}:${ANDROID_HOME}/tools
export PATH=${PATH}:${ANDROID_HOME}/platform-tools
关闭文本编辑器,然后输入以下命令:
源. bash_profile
如果您不想编辑PATH变量,请转到安装SDK的platform-tools目录,该命令就在那里。
你可以这样使用它:
进入你放置SDK的目录: cd /用户/曼苏尔/图书馆/开发/ Android / sdk /平台工具 使用./键入adb命令,以便从当前目录使用它。 ./adb tcpip 5555 .使用实例 亚行。/设备 ./adb连接192.168.XXX.XXX
为了避免每次启动终端时重写$PATH变量,请在主目录(~/)下编辑.bash_profile(对于mac,它只是.profile)文件,并将导出语句放置在文件中的某个位置。
现在每次你启动终端,你的$PATH变量将被正确更新。要在修改概要文件后立即更新终端环境,请输入:
source ~/.profile