ZSH:找不到命令:Mac OS中的ADB
我正在获取ZSH:找不到命令:ADB
错误,即使更新了我的.zshrc
文件。 我已经在.zshrc
文件
# For ADB
export ANDROID_HOME=/Users/aanshu/Library/Android/sdk
export PATH=$ANDROID_HOME/platform-tools:$PATH
export PATH=$ANDROID_HOME/tools:$PATH
export PATH=$ANDROID_HOME/tools/bin:$PATH
neclare -p path
返回以下路径中添加了以下路径
export -T PATH path=( /Users/aanshu/Library/Android/sdk/platform-tools/adb/tools/bin /Users/aanshu/Library/Android/sdk/platform-tools/adb/tools /Users/aanshu/Library/Android/sdk/platform-tools/adb/platform-tools /Users/aanshu/Library/Android/sdk/platform-tools/adb/tools/bin /Users/aanshu/Library/Android/sdk/platform-tools/adb/tools /Users/aanshu/Library/Android/sdk/platform-tools/adb/platform-tools /Users/aanshu/.nvm/versions/node/v12.16.1/bin /Users/aanshu/Library/Android/sdk/platform-tools/adb/tools/bin /Users/aanshu/Library/Android/sdk/platform-tools/adb/tools /Users/aanshu/Library/Android/sdk/platform-tools/adb/platform-tools /usr/local/bin /usr/bin /bin /usr/sbin /sbin /Library/Apple/usr/bin )
I am getting zsh: command not found: adb
error even after updating my .zshrc
file.
I have added the following path in my .zshrc
file
# For ADB
export ANDROID_HOME=/Users/aanshu/Library/Android/sdk
export PATH=$ANDROID_HOME/platform-tools:$PATH
export PATH=$ANDROID_HOME/tools:$PATH
export PATH=$ANDROID_HOME/tools/bin:$PATH
declare -p PATH
is returning the following path
export -T PATH path=( /Users/aanshu/Library/Android/sdk/platform-tools/adb/tools/bin /Users/aanshu/Library/Android/sdk/platform-tools/adb/tools /Users/aanshu/Library/Android/sdk/platform-tools/adb/platform-tools /Users/aanshu/Library/Android/sdk/platform-tools/adb/tools/bin /Users/aanshu/Library/Android/sdk/platform-tools/adb/tools /Users/aanshu/Library/Android/sdk/platform-tools/adb/platform-tools /Users/aanshu/.nvm/versions/node/v12.16.1/bin /Users/aanshu/Library/Android/sdk/platform-tools/adb/tools/bin /Users/aanshu/Library/Android/sdk/platform-tools/adb/tools /Users/aanshu/Library/Android/sdk/platform-tools/adb/platform-tools /usr/local/bin /usr/bin /bin /usr/sbin /sbin /Library/Apple/usr/bin )
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
...显然是错误的。相反,它应该是:
...因为它提供了后续行附加的基础。
...is obviously wrong. It should instead be:
...because it provides a base to which the subsequent lines append.
很抱歉最近回答这个..
对我来说,这些是我所做的。
导出路径= $ path = $ path:/user_name/user_name/android-sdk-macos/platform -tools/
然后保存IT用户控制+X并退出文本编辑器
•在终端i中输入“ source〜/.zshrc”
•关闭所有终端并重新审核它。
就是
,我尝试了终端中的ADB设备来测试它是否有效。而且正在工作
Sorry to answer this this lately ..
For me these are the things that I did.
export PATH=$PATH:/Users/user_name/android-sdk-macos/platform-tools/
then save it user control+x and exit the text editor
• In the terminal I entered “ source ~/.zshrc “
• Closed all terminals and reponed it.
That’s it
Then I tried adb devices in the terminal to test if it works or not. and It was working