22

I am trying to open my Android SDK Manager which I installed and used before, and the instructions on the official website for it here: http://developer.android.com/sdk/installing/adding-packages.html

Say: Mac/Linux: Open a terminal and navigate to the tools/ directory in the Android SDK, then execute android sdk.

But when I navigate into the tools/ directory and execute the command android sdk, I get the following error message:

android: command not found

So why is this happening? How can I fix it? Am I doing something wrong? It worked before so why would it be happening to me now? I ran the command pwd once inside the tools/ directory and this is what it returned:

/home/nikita/android-sdk-linux/tools

Inside the tools/ directory the ls command returns:

android         emulator64-mips  lib           screenshot2
ant             emulator64-x86   lint          source.properties
apps            emulator-arm     mksdcard      support
ddms            emulator-mips    monitor       templates
draw9patch      emulator-x86     monkeyrunner  traceview
emulator        hierarchyviewer  NOTICE.txt    uiautomatorviewer
emulator64-arm  jobb             proguard

I am running Ubuntu 14.10.

4
  • 1
    What does that directory contain (ls)? Perhaps ./android sdk might work, if there is a program called android in that directory and you haven't added it to the PATH.
    – muru
    Jan 23, 2015 at 12:44
  • I have edited the question to include that information to do with ls.
    – user364819
    Jan 23, 2015 at 12:48
  • 1
    Looks like there is a program named android in that directory, so ./android sdk might be what you need.
    – muru
    Jan 23, 2015 at 12:49
  • @muru: Yes, I ran the command you said and it worked, thanks! :) Please post that answer in an actual answer so that I can mark it as accepted. :)
    – user364819
    Jan 23, 2015 at 12:50

3 Answers 3

20

The directory contains a file called android, so presumably what they mean is run ./android sdk (unless . happens to part of your PATH). Also see: How to add a directory to the PATH?, so that you don't need to navigate there and run ./android.

8

Go to tools directory inside your android sdk like:

cd /home/Android/Sdk/tools

and start Android SDK Manager by:

./android
1
  • 1
    android command is now deprecated. For manual SDK, AVD, and project management, please use Android Studio. For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager
    – Abhay
    May 2, 2018 at 20:48
4

This question is rather old, but still I feel its worth explaining that Android have made great effort to make this easier for all, windows mac and linux.

The SDK has now moved to an easy GUI, please follow the instructions below to get it.

Now you have android studio: https://developer.android.com/studio/index.html

With this download, you simply have to extract it, I did it in my home but this is just my choice.

Once you have extracted it, you will then simply need to

navigate to the android-studio/bin/ directory, and execute studio.sh - Please see here for full installation instrutions taken from Android Studio Install Guide

You will simply have to follow an onscreen GUI which will then finish installing.

If it does not restart, please run the above command again.

You will see this screen:

enter image description here

Now please click configureenter image description here

This will create you a desktop searchable item.

Now click the same menu and find the SDK Manager and you can manage everything from thereenter image description here

You must log in to answer this question.