Contact Form

Name

Email *

Message *

Cari Blog Ini

Android Sdk Manager Not Recognized As A Command

Android SDK Manager not recognized as a command

Problem

When trying to run the sdkmanager command in Ubuntu 1804, you may encounter the following error:

sdkmanager: command not found

Cause

The sdkmanager binary is not included in the android-sdk apt package.

Solution

To resolve this issue, follow these steps:

  1. Install the android-sdk package via apt:
  2. sudo apt install android-sdk
  3. Ensure that you have the sdkmanagercmdline-tools package installed. You can verify this by running the following command:
  4. dpkg -l sdkmanagercmdline-tools
  5. If the sdkmanagercmdline-tools package is not installed, install it using the following command:
  6. sudo apt install sdkmanagercmdline-tools
  7. Add the sdkmanager command to your PATH environment variable. You can do this by adding the following line to your ~/.bashrc file:
  8. export PATH=$PATH:/usr/lib/android-sdk/cmdline-tools/latest/bin
  9. Reload your ~/.bashrc file by running the following command:
  10. source ~/.bashrc

Conclusion

By following the steps outlined above, you should be able to resolve the sdkmanager command not recognized error in Ubuntu 1804. This will allow you to manage your Android SDK packages effectively.


Comments