Install Java Development Kit (JDK):
Ensure you have the latest JDK installed. You can download it from Oracle's official website ([invalid URL removed]). Follow the installation instructions for your Ubuntu version. 2. Download the Android SDK Command-Line Tools:
Visit the Android SDK command-line tools page on Google's developer website ([invalid URL removed]). Download the latest stable version, which is currently commandlinetools-linux-latest.zip. 3. Extract the Downloaded File:
Create a directory where you want to extract the SDK tools (e.g., ~/android-sdk): Bash mkdir ~/android-sdk Use code with caution.
Extract the downloaded ZIP file into the directory: Bash unzip commandlinetools-linux-latest.zip -d ~/android-sdk Use code with caution.
Edit your shell's configuration file (e.g., .bashrc for Bash): Bash nano ~/.bashrc Use code with caution.
Add the following lines to the file, replacing ~/android-sdk with the actual path to your SDK directory: Bash export PATH="$PATH:~/android-sdk/cmdline-tools/latest/bin" export ANDROID_HOME=~/android-sdk Use code with caution.
Save and close the file. Reload your shell's configuration: Bash source ~/.bashrc it works