Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

I use this:


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|improve this answer

You can use the same line, but put it in the .zshenv file in your home directory (or create that file if it doesn't already exist).

share|improve this answer
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. – dearborn Jan 19 '13 at 14:45
What is the error? – jjlin Jan 19 '13 at 20:03
Weird. No more error, but when I which adt it says it's not found. – dearborn Jan 20 '13 at 2:39
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-mac-x86_64/sdk/tools‌​ – dearborn Jan 20 '13 at 4:24

Modifying the path didn't work for me.

However, I used homebrew to install the android-sdk brew. When you run brew info android-sdk, it suggests adding the ANDROID_HOME environment variable to the .bashrc file. I added it to .zshenv instead.

In other words, I added the following line to .zshenv:

export ANDROID_HOME=/usr/local/opt/android-sdk

I then opened a new console where I was able to run the cordova android commands successfully.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.