1

I'm not able to include the android sdk to my PATH variable, so that I can use "android" from terminal.

I was following this tutorial to enable phonegap (which is my primary goal http://julianhigman.com/blog/2013/10/17/notes-on-setting-up-phonegap-on-ubuntu-for-android-app-development/)

First I took a look at the official android dev page

http://developer.android.com/sdk/installing/index.html?pkg=studio It says: "You may want to add android-studio/bin/ to your PATH environmental variable so that you can start Android Studio from any directory."

So I extended my .bashrc file with following lines

export PATH="/usr/local/android-sdk/android-studio/bin/:$PATH" 

This points to the correct path as described in on the dev page. Since this does not work I did some deeper research and found several threads which did not help either. (Android command not found even PATH set)

Most recommend to do the following:

export PATH=${PATH}:/usr/local/android-sdk/tools
export PATH=${PATH}:/usr/local/android-sdk/platform-tools

The problem here is, that I dont have any folders named tools or platform tools?

I'm running on Linux mint 16. If anyone could point me in the right direction, that would be great!

Update:

echo $PATH results to:

/usr/local/heroku/bin:/home/foo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/android-sdk/tools:/usr/local/android-sdk/platform-tools:/usr/local/android-sdk/android-studio/bin

But I added only this line

Added to enable android on the path

export PATH="/usr/local/android-sdk/android-studio/bin:$PATH"

Update

Had to install the packages after for android sdk and added them successfully to the .bashrc, now android is available.


Thanks in advance

Best

Community
  • 1
  • 1
xhallix
  • 2,919
  • 5
  • 37
  • 55
  • what you added is the path to the android studio bin, so can launch it. not to be mistaken with the android, adb, and others tools, which sit in `tools` and `platform-tools`. These are under your sdk folder. – njzk2 Feb 09 '15 at 19:39
  • is that for a different purpose then the general "android" command? – xhallix Feb 09 '15 at 19:47
  • is there such file as `/usr/local/android-sdk/android-studio/bin/android`? – njzk2 Feb 09 '15 at 19:52
  • No, you are right. And I notice I can run studio.sh correctly from cmd now, so I guess I installed the wrong package then. I will update my question, since this is not a path issue anymore – xhallix Feb 09 '15 at 19:53
  • you say you want to use `android` from command line. what is it exactly you are trying to acheive ? – njzk2 Feb 09 '15 at 19:53
  • also, tools and platform-tools are probably directly under `/usr/local/android-sdk/` – njzk2 Feb 09 '15 at 19:54
  • @njzk2 I wanted to follow this tutorial http://julianhigman.com/blog/2013/10/17/notes-on-setting-up-phonegap-on-ubuntu-for-android-app-development/ But it seems I'm confusing things here and have to look for the sdk tools or something like that – xhallix Feb 09 '15 at 19:56
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/70592/discussion-between-christoph-ha-and-njzk2). – xhallix Feb 09 '15 at 19:56

0 Answers0