zsh: command not found: emulator

Viewed 1256

I am trying to run the emulator -list-avds via terminal, but for some reason keep on getting this error. Here is my .zshrc profile:

export N_PREFIX="$HOME/n"; [[ :$PATH: == *":$N_PREFIX/bin:"* ]] || PATH+=":$N_PREFIX/bin"  # Added by n-install (see http://git.io/n-in$ 
 # Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"
export PATH=$PATH:/~nativeGuy/Library/Android/sdk
export PATH=$PATH:/~nativeGuy/Library/Android/sdk/platform-tools
export ANDROID_HOME=$HOME/Library/Android/sdk
1 Answers

You could do a

that_guys_home_dir=~nativeGuy # Do tilde-expansion
PATH=$PATH:$that_guys_home_dir/Library/Android/sdk

This allows you to put other people's home directory into the path. Of course, if you happen to be nativeGuy, you would simpler do a

PATH=$PATH:$HOME/Library/Android/sdk

Since you are using zsh, a more elegant solution, which obviates you from worrying about the correct way of doing tilde expansion, would be to do a

path+=~nativeGuy/Library/Android/sdk

This implicitly sets PATH, because path and PATH are kept in-sync.

Related