How do I set the Android bash path in ZSH?

17,870

I use this:

PATH=$PATH:"$HOME/Documents/Android/SDK/platform-tools"

Previously I had to use this to work (when I re-installed the OS X and Zsh, the problem disappeared):

export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:$HOME/Documents/Android/SDK/platform-tools"
Share:
17,870

Related videos on Youtube

dearborn
Author by

dearborn

Updated on September 18, 2022

Comments

  • dearborn
    dearborn over 1 year

    Looking through the Cordova Android docs, I see this line

    You need to add the path to your Android SDK platform-tools and tools directory. In my example I will use "/Development/android-sdk-macosx" as the directory the SDK is installed in. Add the following line:

    export PATH=${PATH}:/Development/android-sdk-macosx/platform-tools:/Development/android-sdk-macosx/tools
    

    How do I set that up in ZSH?

  • dearborn
    dearborn over 11 years
    I have a .zshrc where my paths are set. I added the line there and it throws an error when I start my terminal (it's sourced on startup). I think it has something to do with quotation marks.
  • jjlin
    jjlin over 11 years
    What is the error?
  • dearborn
    dearborn over 11 years
    Weird. No more error, but when I which adt it says it's not found.
  • dearborn
    dearborn over 11 years
    Figured it out. Had to add $HOME to the beginning of each segment. Also, the path for the SDK is wrong. mac-x86_64/sdk/platform-tools:$HOME/Development/adt-bundle-m‌​ac-x86_64/sdk/tools
  • Pranav
    Pranav over 4 years
    @jjlin In Ubuntu 19.10, I create .zshenv as u said and wrote what I wrote in .bashrc to make it work, "export PATH=${PATH}:/home/pranav/platform-tools_r29.0.5-linux/platf‌​orm-tools". But it didn't worked.