-bash: android: command not found on Mac OSX

android, bash, macos

Solution

The `android` tool is located in the `tools` directory in your SDK. You need to add this to your `PATH` environment variable so that bash can recognize it.

You can do this by adding it to your `PATH` in your `.bash_profile` file. This file should be located in your home directory. Create if it doesn't exist using `vi .bash_profile` and add the following line to it:

export PATH=<path_to_android_sdk>/platform-tools:<path_to_android_sdk>/tools:$PATH

where `<path_to_android_sdk>` is to be replaced with the path to your SDK. For example: `"/Users/me/android-sdk-mac_86/platform-tools"`

Problem

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 readme says: Run the following inside the /HelpshiftDemo folder. ``` android update project -t android-17 -p . ``` So I do this, but unfortunately this gives me an error saying `-bash: android: command not found`. I understand this, because "android" as such doesn't refer to anything on my laptop (Mac OSX). So I thought it is maybe referring to the adb. So I tried replacing `android` for the direct path to my adb: ``` /Users/kramer65/dev/adt-bundle-mac-x86_64-20130917/sdk/platform-tools/adb update project -t android-17 -p . ``` This gives me a humongous output with more information on adb, which is I guess not the expected result. So my questions; what does `android` refer to, and how can I fix this on Mac OSX?

Original source

Related problems