I am trying to develop for android and I want to add the adb
to my PATH
so that I can launch it really easily. I have added directories before by f
It appears that you're still trying to execute adb
with ./adb
. That asks the shell to run the program named adb
in the current working directory.
Try just adb
without ./
.
On my Macbook Pro, I've added the export lines to ~/.bash_profile, not .profile.
e.g.
export PATH=/Users/me/android-sdk-mac_86/platform-tools:/Users/me/android-sdk-mac_86/tools:$PATH
Why are you trying to run "./adb"? That skips the path variable entirely and only looks for "adb" in the current directory. Try running "adb" instead.
Edit: your path looks wrong. You say you get
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Libs/android-sdk-mac_x86/tools:/Libs/android-sdk-mac_x86/platform-tools
You're missing the /Users/simon part.
Also note that if you have both .profile and .bash_profile files, only the latter gets executed.
2nd solution is explained below. But when i close the terminal the change which i made in path variable gets lost. Thus i prefer the first way!
Just encase anyone finds this SO post when using Android Studio which includes the SDK has part of the App package (on Mac OSX).
So as @davecaunt and @user1281750 noted but insert the following line to .bash_profile
export PATH=/Applications/Android\ Studio.app/sdk/tools:/Applications/Android\ Studio.app/sdk/platform-tools:$PATH
The answer for MAC should be:
Open your bash_profile with the following commands: open ~/.bash_profile
In case base profile file doesn't exist, create a new one with the following command: touch .bash_profile
then repeat phase 1.
Add the following line: export PATH=/Users/"YOURUSER"/Library/Android/sdk/platform-tools:$PATH
Restart your bash window and test by typing adb shell
Good luck! :-)