Home > other >  zsh: command not found: adb in mac OS
zsh: command not found: adb in mac OS

Time:06-15

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/platform-tools/adb
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 )

CodePudding user response:

export ANDROID_HOME=/Users/aanshu/Library/Android/sdk/platform-tools/adb

...is obviously wrong. It should instead be:

export ANDROID_HOME=/Users/aanshu/Library/Android/sdk

...because it provides a base to which the subsequent lines append.

  • Related