"sdkmanager: command not found" after installing Android SDK

AndroidUbuntuAndroid Sdk-ToolsAndroid Sdk-Manager

Android Problem Overview


I installed via apt-get install android-sdk.

However, doing a find / -name sdkmanager reveals there is no such binary anywhere on the system.

On my Mac, the binary exists in $ANDROID_HOME/tools/bin.

However, on the Ubuntu system (the system with the issue), the binary does not exist there:

$ ls $ANDROID_HOME/tools/bin
e2fsck
fsck.ext4
mkfs.ext4
resize2fs
screenshot2
tune2fs

Where is the sdkmanager?

Edit:

Not sure why the above didn't install sdkmanager, however, one solution I found was to install manually (instead of via apt-get) by downloading the Linux files at https://developer.android.com/studio/#downloads under the "Command line tools only" header.

Android Solutions


Solution 1 - Android

On Ubuntu 18.04, the binary sdkmanager is indeed not included in the apt-package android-sdk.

This worked for me:

  1. Install android-sdk via apt, as you described:
apt-get install android-sdk
  1. Set environment variable ANDROID_HOME if not done yet. For example:
export ANDROID_HOME=/usr/lib/android-sdk
  1. Download and install the command line tools of Android Studio from https://developer.android.com/studio#command-tools. You actually don't need the full Android Studio, just the command line tools.
wget https://dl.google.com/android/repository/commandlinetools-linux-6609375_latest.zip
unzip commandlinetools-linux-6609375_latest.zip -d cmdline-tools
mkdir --parents "$ANDROID_HOME/cmdline-tools/latest"
sudo mv cmdline-tools/* "$ANDROID_HOME/cmdline-tools/latest/"
export PATH=$ANDROID_HOME/cmdline-tools/latest/bin:$PATH

By placing it as a subdirectory of ANDROID_HOME, you can further omit having to provide argument --sdk_root to sdkmanager as described here: https://stackoverflow.com/questions/60440509/android-command-line-tools-sdkmanager-always-shows-warning-could-not-create-se

Solution 2 - Android

Yes, apt-get does not install "tools" directory.

To Download Tools Directory ( which has sdkManager, etc..etc).

There are two ways

  1. From Android Studio --> SDK Manager --> Check "Show Obsolete packages" --> Download platform-tools

  2. Download Cmd Line tools directory directly from here and place it inside SDK

Solution 3 - Android

You need to manually start the Android Studio application installed in your system. [ You can search in the application search bar in ubuntu] Once the installation is completed, you'll see the locations for your SDK manager and your AVD manager.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJoncomView Question on Stackoverflow
Solution 1 - Androiduser3334891View Answer on Stackoverflow
Solution 2 - AndroidNandha KumarView Answer on Stackoverflow
Solution 3 - AndroidDhiraj GandhiView Answer on Stackoverflow