Last active
          May 14, 2024 06:47 
        
      - 
      
- 
        Save gbero/ac42062c9d30dbd18b21eef4cc1e4615 to your computer and use it in GitHub Desktop. 
    Export $ANDROID_HOME on MacOS with Fish shell
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | 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 | 
π
Thanks!
Better emulator path. Add after line 11
set -gx PATH $ANDROID_HOME/emulator $PATH
Updated, thanks! π
π
tnx useful
π
π
π
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
  
            
Better emulator path. Add after line 11
set -gx PATH $ANDROID_HOME/emulator $PATH