Android SDK is not working on OSX

1

2

$ cd /ev-bin/android-sdk-mac_x86/tools
$ ls -al
total 8360
drwxrwx---@ 22 erikvold  staff      748 Aug 28 19:43 .
drwxrwx---@  6 erikvold  staff      204 Aug 30 13:25 ..
drwxrwx---@  5 erikvold  staff      170 Aug 28 19:43 Jet
-rw-rw----@  1 erikvold  staff   195083 Aug 28 19:44 NOTICE.txt
-rwxrwxr-x@  1 erikvold  staff   171656 Aug 28 19:43 adb
-rwxrwxr-x@  1 erikvold  staff     3540 Aug 28 19:43 android
drwxrwx---@ 11 erikvold  staff      374 Aug 28 19:43 ant
-rwxrwxr-x@  1 erikvold  staff     1977 Aug 28 19:43 apkbuilder
-rwxrwxr-x@  1 erikvold  staff     3265 Aug 28 19:43 ddms
-rwxrwxr-x@  1 erikvold  staff    69804 Aug 28 19:43 dmtracedump
-rwxrwxr-x@  1 erikvold  staff     1940 Aug 28 19:43 draw9patch
-rwxrwxr-x@  1 erikvold  staff  2836992 Aug 28 19:43 emulator
-rwxrwxr-x@  1 erikvold  staff   189612 Aug 28 19:43 etc1tool
-rwxrwxr-x@  1 erikvold  staff     1987 Aug 28 19:43 hierarchyviewer
-rwxrwxr-x@  1 erikvold  staff    18308 Aug 28 19:43 hprof-conv
-rwxrwxr-x@  1 erikvold  staff     1939 Aug 28 19:43 layoutopt
drwxrwx---@ 40 erikvold  staff     1360 Aug 28 19:43 lib
-rwxrwxr-x@  1 erikvold  staff    17956 Aug 28 19:43 mksdcard
-rw-rw-r--@  1 erikvold  staff       33 Aug 28 19:43 source.properties
-rwxrwxr-x@  1 erikvold  staff   649368 Aug 28 19:43 sqlite3
-rwxrwxr-x@  1 erikvold  staff     3044 Aug 28 19:43 traceview
-rwxrwxr-x@  1 erikvold  staff    78472 Aug 28 19:43 zipalign
$ android
-bash: android: command not found

Any idea what I am doing wrong?

erikvold

Posted 2010-11-20T04:27:55.667

Reputation: 3 077

Answers

3

http://developer.android.com/sdk/installing.html

Of particular interest:

On Linux, edit your ~/.bash_profile or ~/.bashrc file. Look for a line that sets the PATH environment variable and add the full path to the tools/ directory to it. If you don't see a line setting the path, you can add one: export PATH=${PATH}:/tools

On a Mac OS X, look in your home directory for .bash_profile and proceed as for Linux. You can create the .bash_profile if you haven't already set one up on your machine.

Everett

Posted 2010-11-20T04:27:55.667

Reputation: 5 425

3

Everett's answer is the best solution. As a temporary solution, you can add "./" before the commands and they will run, i.e.:

$ ./android

perfectweb

Posted 2010-11-20T04:27:55.667

Reputation: 31

0

If you have the latest SDK, copy hprof-conv from platform-tools to /tools directory.

Also, make sure you have export PATH=${PATH}:/tools in ~/.bash_profile

Arthur

Posted 2010-11-20T04:27:55.667

Reputation: 1