How to Install Android Studio on Ubuntu 22.04

How to Install Android Studio on Ubuntu 22.04
How to Install Android Studio on Ubuntu 22.04

Android Studio is the officially supported fastest IDE (Integrated Development Environment) for developing androids apps. Instead of using physical devices, Android Studio provides solutions more quickly by using Android Emulators.All major operating systems, including Windows, macOS, and Linux, support it.

In this tutorial I am going to guide you how to setup Android Studio on Ubuntu operating System.

System Requirements for Android Studio

Requirements Minimum Recommended
OS 64-bit Microsoft Windows 8 Latest 64-bit version of Windows
RAM 8 GB RAM 16 GB RAM or more
CPU 2nd generation Intel Core or newer, or AMD CPU Latest Intel Core processor
Disk space 8 GB (IDE and Android SDK and Emulator) Solid state drive with 16 GB or more
Screen resolution 1280 x 800 1920 x 1080

Method 1: Install Android Studio Manually

Step 1: Update and Upgrade APT (Advanced Package Tool) packages

Before installing Android Studio, you need to update and upgrade your system packages on your system. For that you need to execute the following command on the terminal.

💡
You can easily open the terminal by pressing ctrl + alt + t keys
sudo apt update && sudo apt upgrade

If it doesn't work try to execute the commands one by one like below

sudo apt update
sudo apt upgrade

Step 2: Installing Java JDK

To use Android Studio, you need to have the Java Development Kit (JDK) installed on your computer. You can check if it is by running the following command.

java --version
Check Java ersion on Ubuntu

If it doesn't output anything like that, You need to execute the JDK installation command as shown below:

apt install openjdk-11-jdk -y

After installing JDK you can verify it by executing the previous command.

java --version

Step 3: Install Android Studio from the PPA Repository

After updating the system packages and checking java is installed or not in the system. You can import the Android Studio PPA by running the below command:

sudo add-apt-repository ppa:maarten-fonville/android-studio
Install Android Studio from the PPA Repository

Step 4: Update the System Repository

The system repository must be updated once more after the Android Studio PPA repository is added, for that the below command can be used.

sudo apt update -y

Step 6: Install Android Studio in Ubuntu

Now install Android Studio on your Ubuntu machine, by using the following command

sudo apt install android-studio -y

We have successfully installed Android Studio on Ubuntu 22.04. We can simply check if it is installed or not by simply searching Android Studio on search bar. For that first press the Super key (❖) and search Android Studio like below.

Checking Android Studio is installed or not

Method 2: Installing Android Studio by Using the Snap Tool

You can install Android Studio using the snap package if you don't want to add a PPA to your source list.

An application and all of its dependencies are indeed included in the snap package for Android Studio. However, keep in mind that the snap package is typically a few releases behind the PPA, so your version of Android Studio may be a little out of date. Make an informed choice!

Using the Snap tool, install Android Studio:

If you haven't already installed snap on your system, use the apt install command below to do so.

apt install snapd -y
Installing snap on the system

To update the list of available snap packages, execute the snap refresh command below.

snap refresh
Refreshing the snap packages

To install android-studio on your machine, run the following command.

sudo snap install android-studio

Above command pulls all the dependencies that are required to install Android Studio.

You may receive a restriction error as shown below. This error message indicates that Android Studio has the ability to make system modifications that might endanger your system. Snaps that are not restricted to the security sandbox frequently experience this problem.

Restriction error from the snap

To install Android Studio, use the following command if you have confidence with the Android Studio snap. Snap can make any necessary system modifications as a traditional package by using the --classic flag.

Installing Android Studio by using Snap tool

We have successfully installed Android Studio on Ubuntu 22.04. We can simply check if it is installed or not by simply searching Android Studio on search bar. For that first press the Super key (❖) and search Android Studio like below.

Checking Android Studio is installed or not

Read more