Skip to content

Instantly share code, notes, and snippets.

@gbero
Last active May 14, 2024 06:47
Show Gist options
  • Save gbero/ac42062c9d30dbd18b21eef4cc1e4615 to your computer and use it in GitHub Desktop.
Save gbero/ac42062c9d30dbd18b21eef4cc1e4615 to your computer and use it in GitHub Desktop.
Export $ANDROID_HOME on MacOS with Fish shell
touch ~/.config/fish/config.fish;
echo "set --export ANDROID $HOME/Library/Android;" >> ~/.config/fish/config.fish
echo "set --export ANDROID_HOME $ANDROID/sdk;" >> ~/.config/fish/config.fish
echo "set -gx PATH $ANDROID_HOME/tools $PATH;" >> ~/.config/fish/config.fish
echo "set -gx PATH $ANDROID_HOME/tools/bin $PATH;" >> ~/.config/fish/config.fish
echo "set -gx PATH $ANDROID_HOME/platform-tools $PATH;" >> ~/.config/fish/config.fish
echo "set -gx PATH $ANDROID_HOME/emulator $PATH" >> ~/.config/fish/config.fish
echo "set --export JAVA_HOME /Applications/Android\ Studio.app/Contents/jbr/Contents/Home;" >> ~/.config/fish/config.fish
echo "set -gx PATH $JAVA_HOME/bin $PATH;" >> ~/.config/fish/config.fish
@kgstaley
Copy link

👍

@lukaspechar
Copy link

👍

@mattwr18
Copy link

I added it like:

set -U $ANDROID_HOME $HOME/Library/Android/sdk
set -U fish_user_paths $ANDROID_HOME/tools $ANDROID_HOME/tools/bin $ANDROID_HOME/platform-tools $ANDROID_HOME/emulator

but which adb wasn't returning the path, so I needed to add the platform-tools with $ANDROID_HOME/platform-tools/adb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment