0

I have my ADT folder at /Users/username/Development/adt-bundle-mac-x86_64-20140702/ and I am trying to set the bash_profile file to work with it because whenever I type "android" or "adb" into the terminal, it returns "-bash: android: command not found". Right now, my .bash_profile (which is stored at /Users/username/) looks like:

export PATH=$PATH:~/bin
export ANDROID_HOME=/Developer/adt-bundle-mac-x86_64-20140702/
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

After each time I update the file to try something else, I save it and then type "source .bash_profile" into the terminal to refresh the file. Is it possible that I should be using a command?

I have gone through numerous tutorials on Stack Overflow and other sites, but none of them are working.

Thanks in advance for the help

2
  • What do you see if you type echo $PATH ? Can you invoke those tools if you specify the full pathname of the executable, or might there be a permission issue or path typo as well? Commented Jul 28, 2014 at 18:45
  • @ChrisStratton Here's the output:nicks-mbp:~ nick$ echo $PATH /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/Users/nick/bin:/Developer/adt-bundle-mac-x86_64-20140702//tools:/Developer/adt-bundle-mac-x86_64-20140702//platform-tools Commented Jul 28, 2014 at 18:47

2 Answers 2

0

Your variable ANDROID_HOME doesn't match the path that you say your ADT folder is located at. Try changing it to:

export PATH=$PATH:~/bin
export ANDROID_HOME=/Users/username/Development/adt-bundle-mac-x86_64-20140702/sdk
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
Sign up to request clarification or add additional context in comments.

10 Comments

Oh, right. Duh. I changed ANDROID_HOME, but it still doesn't solve the problem. Here's the output when I echo the $PATH: nicks-mbp:~ nick$ echo $PATH /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/Users/nick/bin:/Users/nickstigsell/Development/adt-bundle-mac-x86_64-20140702//tools:/Users/nickstigsell/Development/adt-bundle-mac-x86_64-20140702//platform-tools
Take out the backslash at the end of the ANDROID_HOME variable, and see if that does it. I've edited my answer
I removed the trailing slash on line 2: but that doesn't work either. Here's the echo $PATH: nicks-mbp:~ nick$ echo $PATH /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/Users/nick/bin:/Users/nickstigsell/Development/adt-bundle-mac-x86_64-20140702/tools:/Users/nickstigsell/Development/adt-bundle-mac-x86_64-20140702/platform-tools
Usually the way the adt-bundle is laid out there is a sdk/ folder that contains the commands you're looking for, try adding /sdk to the end of the ANDROID_HOME variable
Yes, find the tools and test them with full paths from the command line, then update your path.
|
0

Have you checked the shell you are using is ksh or bash? I had same problem but after changing from ksh to bash,it worked every time! refer this answer

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.