Looking to develop Android apps on your Ubuntu system? You're in the right place. Today, we're going to guide you through installing Android Studio, the official Integrated Development Environment (IDE) for Google's Android operating system, using the command line with sudo apt.

Before we dive in, ensure your system is up-to-date by running these commands in your terminal:

Installing Java
Before we proceed with Android Studio, we need to install Java, as it's a prerequisite. Open your terminal and run:

sudo apt update
sudo apt install default-jdk
Verify Java Installation

To verify that Java is installed correctly, run:
java -version
Installing Android Studio

Now that Java is installed, let's proceed with Android Studio. First, download the Android Studio deb package using the wget command:
wget https://redirector.gvt1.com/edgedl/android/studio/ide-zips/2020.3.1.22/android-studio-2020.3.1.22-linux.tar.gz
Extract the Android Studio Tarball

Extract the downloaded tarball using the following command:
tar xvf android-studio-2020.3.1.22-linux.tar.gz




















Move Android Studio to /opt
Now, move the extracted folder to the /opt directory for better management:
sudo mv android-studio /opt/
Create a Desktop Shortcut
For convenience, let's create a desktop shortcut. Create a new .desktop file in /usr/share/applications with the following content:
nano ~/android-studio.desktop
Then, paste the following into the file, adjusting the paths as necessary:
[Desktop Entry] Type=Application Name=Android Studio Comment=The official IDE for Android application development Exec=/opt/android-studio/bin/studio.sh Icon=/opt/android-studio/bin/studio.png Categories=Development;IDE; Terminal=false
Finally, launch Android Studio using:
android-studio
As you settle into Android Studio, explore and understand its interface. You're now ready to start coding and building your Android apps! Happy coding!