-bash: android: command not found on Mac OSX

前端 未结 9 1864
陌清茗
陌清茗 2020-12-12 13:38

I\'ve been diving into Android development for a while, and now I want to use some project (helpshift) in my app. On the website they have some example apps in which the rea

9条回答
  •  遥遥无期
    2020-12-12 14:27

    Step 0

    The first step is install Android SDK: https://developer.android.com/studio

    I don't like the default configurations. I installed SDK in this folder:

    /Users//Android\ SDK
    

    ℹ️ The default path is

    $HOME/Library/Android/sdk
    

    Step 1

    The next command open your bash or zshrc configuration file:

    Bash profile:

    vim ~/.bash_profile
    

    If you use zsh:

    vim ~/.zshrc
    

    Step 2

    You're ready to update your configurations:

    # File: .bash_profile | .zshrc
    
    # Custom path to Android SDK folder. 
    # If you use the default configuration please change ANDROID_HOME to $HOME/Library/Android/sdk
    export ANDROID_HOME=/Users//Android\ SDK
    export PATH=$ANDROID_HOME/tools:$PATH
    export PATH=$ANDROID_HOME/platform-tools:$PATH
    

    Step 3

    Option 1: Restart your terminal and you should be able to use android command

    Option 2: source your bash or zsh profile.

    Example: source ~/.bash_profile / source ~/.zshrc

提交回复
热议问题