Installing Android Studio in Ubuntu and Other Linux

Learn how to install Android Studio on Ubuntu and other Linux distributions. Also learn the method of removing it.
Warp Terminal

Android Studio, Google’s own IDE for Android development, is a nice alternative to Eclipse with ADT plugin.

The additional advantage of Android Studio is that even if you are not developing apps, create an Android device emulator, which can run popular apps for you.

So, even if it is a workaround, you can run Android apps on Linux using Android Studio.

In Linux, there is no native package for Android studio that you can install using the package managers like APT.

To install, you either need to rely on the snap package or install it as mentioned in the official documentation. Both the method will be discussed here. Ubuntu users have a PPA to help them out.

You have to be careful about the minimum system requirements.

  • Any 64-bit Linux distribution that supports GNOME, KDE, or Unity DE; GNU C Library (glibc) 2.31 or later.
  • At least 8 GB RAM (16 GB is better) and 8 GB disk space (16 GB or more is better)
  • x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD processor with support for AMD Virtualization (AMD-V) and SSSE3.
  • Enable KVM in Ubuntu, for better performance.
  • A screen resolution of 1920 x 1080 or more
🚧
Before you proceed to install Android Studio, make sure that you have Java installed in Ubuntu.

Method 1: Install Android Studio in Ubuntu as a Snap (Easiest)

Ever since Ubuntu started focusing on Snap packages, more software have started providing easy to install Snap packages. Android Studio is one of them. Ubuntu users can find the Android Studio application in the Software Center and install it from there.

Install Android Studio from Ubuntu Software Center
Android Studio in Software Center

If you see an error while installing Android Studio from Software Center, you can use the Snap commands to install Android studio.

sudo snap install android-studio --classic
📖
After installing Android Studio, you need to set it up, which is described in the next section (Method 2).

Remove Android Studio Snap

To remove Android Studio, installed as a snap, either use the “Remove” button on Software center or use the command below:

sudo snap remove android-studio

Easy-peasy!

Method 2: Install Android Studio in Ubuntu and Linux Mint via unofficial PPA

Thanks to Paolo Ratolo, and maarten-fonville we have a PPA which can be used to easily install Android Studio in Ubuntu, Linux Mint and other Ubuntu-based distributions. Just note that it will download around several hundred MBs of data. So, mind your internet connection as well as data charges (if any).

Open a terminal and use the following commands to install dependencies and libraries and Java.

sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386
sudo apt install openjdk-11-jdk

In the above step, we have installed Java required for the app to run. Now, add the PPA and install Android Studio.

sudo add-apt-repository ppa:maarten-fonville/android-studio
sudo apt update
sudo apt install android-studio

This will install Android Studio and you can open it from the system menu. Once opened, the remaining setup is described in the method 3.

Was it not easy? While installing a program from source code is fun in a way, it is always nice to have such PPAs. Once we have seen how to install Android Studio, let's see how to uninstall it.

Remove Android Studio

First remove the Android Studio installed using:

sudo apt purge android-studio

If you don’t have already, install PPA Purge:

sudo apt install ppa-purge

Now use the PPA Purge to purge the installed PPA:

Method 3: Install Android Studio in any Linux Distributions using the official method (Complicated)

Android Studio has a package that will help you easily install it on a Linux system. You should make sure that, the minimum requirements mentioned in the previous section are met.

Set up the required dependencies and prerequisites

To install from the official files, you need to install some prerequisite libraries and dependencies.

For Debian/Ubuntu-based systems, use the command below:

sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386

If you are using Fedora, use the command as given below:

sudo yum install zlib.i686 ncurses-libs.i686 bzip2-libs.i686

Download the Installer File

Android studio provides official files to install the software on Linux distributions. You need to go to the official downloads page and download the installer files.

Download Android Studio installer files from the official website.
Download Android Studio

This will ask you to accept their Terms and Conditions. Scroll down the page and check the Accept button. Now, click on the Download button to start your download.

Accept the Android Studio Terms and Conditions to start your download.
Accept T&C to Start Download

Ensure you have a fast internet connection because the files are around 1.1 GB in size.

Start the Installer

Once you have downloaded the file, extract the tar file. You can do this from the file manager, by right-click and selecting Extract.

Extract the Android Studio TAR file for Linux using Nautilus File Manager
Extract the TAR File

Once extracted, move inside the extracted folder. Now, right-click on an empty place and select “Open in Terminal” to open a terminal there.

Open a terminal inside the extracted directory.
Open a Terminal

Now, move the android-studio directory to:

  • /opt/ for shared users.
  • /usr/local/ for your user.

Use the command like:

sudo mv android-studio /opt/

Start Android Studio by going inside the /android-studio/bin. Considering you have copied it to /opt/, run:

/opt/android-studio/bin/studio.sh 

Or if you moved it to /usr/local/, then use the command:

/usr/local/android-studio/bin/studio.sh

This will open the setup. When first opened, select “Do not import Settings” and then press OK.

Select “Do not import Settings” and press OK button.
Do not Import Settings

It will then ask for consent to share Usage statistics data with Google. Select accordingly.

Asking to Share usage statistics with Google
Share Usage Statistics

Now, on the welcome screen, click on Next.

Click the Next button on the first page of the setup wizard
Click Next on Welcome Page

Set the installation type as Standard and click Next.

Set the installation type as Standard, which will be sufficient for a normal user.
Installation type: Standard

The setup wizard will now give you an overview of settings and the files to be downloaded, if you are ok with those, click on Next.

🚧
Remember, it will start downloading several GBs of files. So before starting, make sure you have a sufficiently fast internet connection.
Verify the settings and click Next to start downloading the required files and setting up.
Verify Settings

On the next screen, first you need to accept the Android SDK License.

Accept Android SDK License
Accept Android SDK License

Next, you need to select android-sdk-arm-dbt-license and accept it.

Accept “android-sdk-arm-dbt-license” also and then click on the Next button.
Accept “android-sdk-arm-dbt-license”

On the next screen, click on the Finish button.

Click on Finish Settings to Complete the Initial setup
Finish Settings
💡
You can follow the link on the above screen to configure Hardware Acceleration for Android Emulator and enable KVM to achieve better performance.

This will start downloading and extracting the required files. You should need a better internet connection and wait for some time for the operation to finish.

Downloading and Extracting files by Android Studio Setup
Downloading Files

Click on the Finish button, when the processes are completed.

Click the Finish button to complete the setting up.
Click on the Finish Button

You will reach the welcome screen of Android studio.

Create a Desktop Entry

For easy access to Android Studio from everywhere, you should create a desktop entry for it. For this, first, click on the gear icon on the Android Studio welcome screen. From the dropdown menu, select “Create a Desktop Entry” item.

Click on the Gear Icon on the welcome page and select the “Create a Desktop Entry” button from the dropdown menu.
Click on Create Desktop Entry

On the next page, you will be asked for whom, this desktop entry be created. If you want to create it for all users (Android Studio Files in /opt/ directory), you need to enter the password as well. Click OK.

Click OK to create the desktop entry for Android Studio
Confirm Desktop Entry Creation

You can now open Android studio from Ubuntu activities overview, or your system menu.

Open Android Studio from Ubuntu Activities Overview
Open Android Studio

Updating Android Studio

If you have an update, it will notify you about the same. Or, to check for any update manually, click on Gear Icon → Check for Updates.

Click on Check for Updates in Android Studio
Check for Updates

If there is no update, it will be notified, once you do this.

Running the latest version of Android Studio notification
No updates available

Removing Android Studio

To remove Android studio, first, you need to remove the desktop file.

sudo rm /usr/share/applications/jetbrains-studio.desktop
💡
If not found, you can find the desktop file at ~/.local/share/applications.

After this, remove the android-studio directory from /opt/.

sudo rm -rf /opt/android-studio/

Now, you can remove the residual directory from your Home.

🚧
Remember to backup any files or projects before removing the studio.
rm -rf ~/Android

Wrapping Up

I hope this quick helps you to install Android Studio in Ubuntu and Linux Mint, and other Linux distributions. Before you run Android Studio, make sure to install Java in Ubuntu first. In similar posts, I advise you to read how to install and configure the Ubuntu SDK and how to install Microsoft Visual Studio easily in Ubuntu.

Any questions or suggestions are always welcomed. Ciao 😄

Here is a list of open-source Android apps that you can use.

40+ Best Open Source Android Apps
The best open source Android apps. Replace the proprietary options to enjoy a potentially better experience!

Looking for some Android emulators? We have got you covered.

6 Best Android Emulators to Run & Test Android Apps on Linux
Want to run Android on Linux? These Android emulators and solutions should help!
About the author
Abhishek Prakash

Abhishek Prakash

Created It's FOSS 11 years ago to share my Linux adventures. Have a Master's degree in Engineering and years of IT industry experience. Huge fan of Agatha Christie detective mysteries 🕵️‍♂️

Become a Better Linux User

With the FOSS Weekly Newsletter, you learn useful Linux tips, discover applications, explore new distros and stay updated with the latest from Linux world

It's FOSS

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to It's FOSS.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.