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:
- Install the
android-sdk
package via apt: - Ensure that you have the
sdkmanagercmdline-tools
package installed. You can verify this by running the following command: - If the
sdkmanagercmdline-tools
package is not installed, install it using the following command: - Add the
sdkmanager
command to yourPATH
environment variable. You can do this by adding the following line to your~/.bashrc
file: - Reload your
~/.bashrc
file by running the following command:
sudo apt install android-sdk
dpkg -l sdkmanagercmdline-tools
sudo apt install sdkmanagercmdline-tools
export PATH=$PATH:/usr/lib/android-sdk/cmdline-tools/latest/bin
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