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 )
adb
executable? If you rundeclare -p PATH
, does it reflect this configuration, showing the extra entries it's intended to add? – Plotecho "$PATH"
ordeclare -p PATH
it will show the actual value. – PlotPATH
won't show the changes you made. We need to know if that's the case. – PlotANDROID_HOME
at the wrong place. It shouldn't point all the way to theadb
executable; it should point to the.../Library/Android/sdk
directory. – Plotexport -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
– Basketball/Users/aanshu/Library/Android/sdk/platform-tools/adb/platform-tools /usr/local/bin /usr/bin /bin /usr/sbin /sbin /Library/Apple/usr/bin )
– Basketballfind /Users/aanshu/Library/Android/sdk -name adb -type f -print
? – Plotfind
output, you need to make sure that the directory containing theadb
executable (not the executable itself, but its parent directory) is one of the things shown in the dumpedPATH
list. – Plot/Users/aanshu/Library/Android/sdk/platform-tools/adb
; but instead of adding/Users/aanshu/Library/Android/sdk/platform-tools
to the PATH, you're instead adding/Users/aanshu/Library/Android/sdk/platform-tools/adb/platform-tools
– Plot.zshrc
file – Basketball