The Wayback Machine - https://web.archive.org/web/20240920195326/https://www.geeksforgeeks.org/how-to-install-android-studio-on-ubuntu/
Open In App

How to Install Android Studio on Ubuntu?

Last Updated : 04 Apr, 2024
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

Android Studio is a full-featured cross-platform IDE that helps us to build applications for Android devices. Android Studio is based on JetBrains’ IntelliJ IDEA. This IDE includes everything we need for Android development. Android Studio build system is powered by Gradle allowing you to make multiple build variants for various devices from one project. This article will explain the way to install Android Studio on Ubuntu 20.04. We can use the same instructions for older Ubuntu versions and any Ubuntu-based distribution, including Ubuntu, Linux Mint, and Elementary OS.

Prerequisites: We need to be logged in as a user with sudo access. It will make our system able to install packages on our Ubuntu system.

System Requirements for Installing Android Studio in Ubuntu

These are some important specifications our machine needs to meet:

  • 64-bit distribution capable of running 32-bit applications.
  • GNU C Library (glibc) 2.19 or later
  • A minimum of 3 GB RAM, 8 GB RAM is recommended; plus 1 GB for the Android Emulator.
  • The minimum disk space should be 2 GB,
  • 4 GB Recommended (1.5 GB for Android SDK and emulator system image + 500 MB for IDE)
  • The minimum screen resolution should be 1280×800.

Methods to Install Android Studio on Ubuntu

There are multiple methods to Install Android Studio on Ubuntu as mentioned below:

  • From the Ubuntu Software Centre
  • Using Snap Tool
  • Using Repository
  • Using Zip File

Explanation of the Methods and Steps are mentioned below:

1. From The Ubuntu Software Centre

We can easily install Ubuntu software from Ubuntu Software Centre but desired software must exist in the software store. To install Android Studio we can visit the Ubuntu Software Centre and search for Android Studio. Once we found the software easily clicked on the install button. We will get a password prompt to confirm the installation process. Once the installation is completed we will have the Android Studio icon in our application tray. Once it is installed successfully, we can check the final setup section.

2. Using The Snap Tool

When the snap tool is available it becomes too easy to install software packages. We do not have to modify any files or type in any scary commands. But we need to have Snap installed on our machine in the first place.

i). We can install Snap, using the below command:

$ sudo apt-get install snapd

ii). Once the installation of Snap gets successful, we can proceed to install Android Studio with the below command:

$ sudo snap install android-studio

It may take some time, hence we have to wait for some minutes. It should be installed successfully, but for some reason, if it throws an error like this:

error: This revision of snap “android-studio” was published using classic confinement and thus may perform arbitrary system changes outside of the security sandbox that snaps are usually confined to, which may put your system at risk.

iii). Then we have to add the –classic parameter to the command as shown below:

$ sudo snap install android-studio --classic

Once it installed successfully, we can check the final setup section.

3. Install Android Studio Using Repository

There are Steps to Install Android Studio using Repository.

i). Add the PPA(Personal Package Archive)

The first command adds the PPA to system software sources.

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

ii). Update the package list

Update the package manager list to include the added repository.

sudo apt update

iii). Install Android Studio

Installing Android Studio using the command line in terminal.

sudo apt install android-studio

4. Using the Zip File

Installing Java OpenJDK

To install Android Studio we require OpenJDK version 8 or above to be installed in our system. First, we will install OpenJDK 8. The installation is very simple, steps are mentioned below:

i). We can start by updating the package index:

$ sudo apt update

ii). Now install the OpenJDK 8 package using the below command

$ sudo apt install openjdk-8-jdk

iii). To verify the installation we can use the below command to check the version:

$ java -version

The output will be something like this:

openjdk version "1.8.0_191"
OpenJDK Runtime Environment (build 1.8.0_191-8u191-b12-2ubuntu0.18.04.1-b12)
OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)

Downloading Android Studio

To download and install the Android Studio, visit https://developer.android.com/studio. Click on the “Download Android Studio Giraffe” button.

Download_Android_Studio

A prompt asking us to accept all the licenses will appear. Scroll to the bottom and accept the license and click on “Download Android Studio Iguana | 2023.2.1 Patch 1 for Linux”.

Note: The version number may vary based on the time of installation

Terms_and_Condition

After downloading the zip file, locate it in your file explorer and extract it.

Copy over the extracted folder to /opt/local.

cd /path/to/extracted/folder
sudo cp android-studio/ /opt/local/ -v

Now Android Studio has been installed on our Ubuntu desktop.

Starting Android Studio

Once the Android Studio is installed in the system using snap, we can start Android Studio through our terminal by typing android-studio in our terminal or by clicking on the Android Studio icon.

To start Android Studio when installed using the zip file, run the following command:

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

Tip: To make Android Studio available in your list of applications, select Tools > Create Desktop Entry from the Android Studio menu bar.

When we start Android Studio for the first time, the below window will appear asking us to import Android Studio settings from a previous installation:

When we click on the OK button, the Setup Wizard window will appear. We have to click on the Next button to start the initial configuration and post-installation steps. Now option to choose the type of setup we want for Android studio will appear. We can select the “Standard” option or “Custom” option if we want to customize our Android Studio.

We can select the UI theme and the Setup Wizard on the next step. It will download and install the required SDK components. The process may take some time depending on our system and connection speed. Once the Android Studio IDE is loaded, the Welcome page will be presented:

android-studio



Similar Reads

How to fix "Android Studio doesn't see device" in Android Studio?
In Android Studio, sometimes the list of devices and emulators doesn't list your physical device when you try to plug it in. Or you may have faced a situation when you plugged the phone in for the first time, no dialog appeared asking if you trust the computer. But the laptop is already allowed to connect to the mobile device. However, the button R
4 min read
How to Fix "Android studio logcat nothing to show" in Android Studio?
Logcat Window is the place where various messages can be printed when an application runs. Suppose, you are running your application and the program crashes, unfortunately. Then, Logcat Window is going to help you to debug the output by collecting and viewing all the messages that your emulator throws. So, this is a very useful component for the ap
2 min read
How to Download and Install Visual Studio Code on Ubuntu?
Visual Studio Code is a code editor that is basically used for web development or cloud platforms, but nowadays Visual Studio Code can do a lot. It is stated as the second most used code editor by developers in 2022 so if you are an aspiring IT student or a developer you should know how to use Visual Studio Code. Let's learn how to install Visual S
1 min read
How to Install OBS Studio on Ubuntu
OBS Studio is an open-source screen-casting and streaming application that works across platforms. Hugh "Jim" Bailey and his crew created it, and it was first launched on September 1, 2012. It is written in C and C++ and is accessible in 59 different languages. It also allows for real-time capture, scene design, recording, encoding, and broadcastin
2 min read
How to Install Android Applications in Mobile Phone without USB Cables using Android Studio?
Android Studio is the official integrated development environment for Google’s Android operating system, built on JetBrains’ IntelliJ IDEA software and designed specifically for Android app development. After successfully Setting up an Android project, and write down the necessary codes the next task is to run the application on an emulator or on a
2 min read
How to Fix “Failed to install the following Android SDK packages as some licenses have not been accepted” Error in Android Studio?
When you download the latest Android SDK tools version using the command line to install SDKs and you just try to build gradle then this error shows up: Failed to install the following Android SDK packages as some licenses have not been accepted. platforms;android-27 Android SDK Platform 27 build-tools;27.0.3 Android SDK Build-Tools 27.0.3 To build
4 min read
How To Completely Uninstall Android Studio On Ubuntu?
To entirely uninstall Android Studio from your Ubuntu system, you have to follow a lot of steps. These steps include: uninstalling the application, and removing associated files plus its configuration so that no traces of it remain behind after removal. This article aims to provide clear instructions on how to completely remove Android Studio from
5 min read
How to Install and Uninstall Plugins in Android Studio?
Android Studio provides a platform where one can build apps for Android phones, tablets, Android Wear, Android TV, and Android Auto. Android Studio is the official IDE for Android application development, and it is based on the IntelliJ IDEA. One can develop Android Applications using Kotlin or Java as the Backend Language and it provides XML for d
3 min read
How to Install Android Studio Canary Version?
Android Studio is an official development environment for building Android apps which is provided by Google. This IDE is built on JetBrains IntelliJ IDEA software which is designed for Android development. This version of Android Studio comes with a modern UI toolkit for building native Android UI. It is based on a declarative programming model so
4 min read
How to Install an APK on the Emulator in Android Studio?
In this article, we will know, how we can install APK in our Android Studio Emulator. There are several methods to do that but most of them are quite unreliable and confusing but in this article, we are going to do that with some very easy methods with some very easy steps. Method 1 Step 1: Opening Emulator First of all, we need to open the Android
2 min read
How to Install and Use GIT in Android Studio?
Git is created by Linus Torvald. Git is the most popular Version Control System in the world, used by millions of developers. It helps us to keep track of all the files in a project. Git tracks every change that are made. If we make a mistake, it can reset a file to match a previous version or we can also reset the version of all the project files
4 min read
How to Install Android Studio on Kali Linux?
Android Studio is an official integrated development environment (IDE) for android application development. It is available for all platforms macOS, Linux, and windows. It is developed and managed by google and comes under JetBrains. Furthermore, it supports different languages like java, Kotlin, dart, etc. Installing Android Studio Step 1: Downloa
2 min read
Guide to Install and Setup Visual Studio for Android App Development
To start developing Android applications, one has to set up a proper development environment. It facilitates developers to use the tools needed in creating an app and ensure that all operations/processes carried out in a smooth manner. An IDE(Integrated Development Environment) is a complete application suite that provides services like writing and
4 min read
How to Install Genymotion Emulator and Add it’s Plugin to Android Studio?
If you're an Android developer looking for a powerful and efficient emulator, installing the Genymotion emulator might be the perfect solution for you. Known for its speed and reliability, the Genymotion emulator for Android development offers a seamless experience. In this guide, we'll walk you through the steps to install the Genymotion emulator
5 min read
How to Install and Set up Android Studio on Windows | Step by Step Guide
If you are starting your Android learning journey, Andriod Studio is the first thing you will install to write code on your system. This article will guide you on how to install and set up Android Studio on Windows 10, and 11 and what the actual Android Studio system requirements are. Quick Brief of Android Studio Android Studio is the official IDE
5 min read
How to Clone Android Project from GitHub in Android Studio?
Android Studio provides a platform where one can build apps for Android phones, tablets, Android Wear, Android TV, and Android Auto. Android Studio is the official IDE for Android application development, based on IntelliJ IDEA. One can develop Android Applications using Kotlin or Java as the Backend Language, and it provides XML for developing Fro
3 min read
How to Add OpenCV library into Android Application using Android Studio?
OpenCV is the huge open-source library for computer vision, machine learning, and image processing and now it plays a major role in real-time operation which is very important in today’s systems. By using it, one can process images and videos to identify objects, faces, or even the handwriting of a human. When it integrated with various libraries,
3 min read
How to Add Audio Files to Android App in Android Studio?
The audio file format is a file format for saving digital audio data on a computer system and all are aware of audio files. So in this article, we are going to discuss how can we add audio files to the android app. There are three major groups of audio file formats: Format Name Description Examples Uncompressed audio formatsUncompressed audio forma
3 min read
Different Ways to Change Android SDK Path in Android Studio
Android SDK is one of the most useful components which is required to develop Android Applications. Android SDK is also referred to as the Android Software Development Kit which provides so many features which are required in Android which are given below: A sample source code.An Emulator.Debugger.Required set of libraries.Required APIs for Android
5 min read
How to Capture a Screenshot and Screen Recording of an Android Device Using Android Studio?
Android Studio is the official IDE (Integrated Development Environment) for Android app development and it is based on JetBrains’ IntelliJ IDEA software. Android Studio provides many excellent features that enhance productivity when building Android apps. Whenever we are developing an app and in that device, you don't know how to capture screenshot
2 min read
Different Ways to Fix “Select Android SDK” Error in Android Studio
Android SDK is one of the most useful components which is required to develop Android Applications. Android SDK is also referred to as the Android Software Development Kit which provides so many features which are required in Android which are given below: A sample source code.An Emulator.Debugger.Required set of libraries.Required APIs for Android
5 min read
Different Ways to Analyze APK Size of an Android App in Android Studio
APK size is one of the most important when we are uploading our app to Google Play. APK size must be considered to be as small as possible so users can visit our app and download our app without wasting so much data. In this article, we will take a look at How we can analyze our APK in Android Studio to check the APK size. Android Studio itself pro
3 min read
Different Ways to fix "Error running android: Gradle project sync failed" in Android Studio
Gradle is one of the most important components of Android apps. It handles all the backend tasks and manages all the external dependencies which we will be going to use in building our Android Application. Sometimes due to any issue or after formatting of your pc. Some of the Gradle files may get deleted unexpectedly. So when you will start buildin
3 min read
How to Build a Number Shapes Android App in Android Studio?
Android is a vast field to learn and explore and to make this learning journey more interesting and productive we should keep trying new problems with new logic. So, today we are going to develop an application in android studio which tells us about Numbers that have shapes. We will be covering two types of numbers i.e. triangular and square. So, f
4 min read
How to Fix "android.os.Network On Main Thread Exception error" in Android Studio?
The main reason for Network On Main Thread Exception Error is because the newer versions of android are very strict against the UI thread abuse. Whenever we open an app, a new “main” thread is created which helps applications interact with the running components of an app’s UI and is responsible for dispatching events to assigned widgets. The entir
3 min read
10 Android Studio Tips and Tricks For Android Developers
To become a good Android developer you should be familiar with Android Studio with some of its tips and tricks. These tips and tricks will help you to become a good Android developer and it will also help you to improve your efficiency in developing Android Apps. In this article, we will be discussing 10 Android Studio, Tips, Tricks, and Resources
6 min read
Fix "Android emulator gets killed" Error in Android Studio
Sometimes, (maybe after updating Android Studio) you might encounter a strange error, which might cause you a nightmare, the error is thrown by the Studio itself and it says: Error while waiting for device: The emulator process for AVD was killed Uggh...Now, what's this error all about? Why did it happen on the system? How do I fix it? Follow the S
3 min read
How to Build Binary to Decimal Converter Android App in Android Studio?
This app will convert a Binary Number into a Decimal Number. Some people may also have written a java program to convert a Binary Number into a Decimal Number, but while making an app let's see how to do that. Brief Go Through We will start by creating a new project with an Empty Activity. After creating a project, we would add the drawable resourc
5 min read
How to Use Stack Overflow to Fix Errors During Android App Development in Android Studio?
Stack Overflow, the life savior of developers, feels like Stack Overflow is built for the developers, by the developers, of the developers. According to Wikipedia: "Stack Overflow is a question-and-answer site for professional and enthusiast programmers". So being a developer or programmer can you imagine your life without Stack Overflowâ€Ķ. ? Most p
4 min read
Fix "Error running android: Gradle project sync failed. Please fix your project and try again" in Android Studio
In this article, we will see how to fix the error: "Gradle project sync failed. Please fix your project and try again" in Android Studio". Before getting into the solution part, let's discuss Gradle. What is Gradle? Gradle is an open-source build automation tool that automates the creation of applications. The various steps involved in creating an
5 min read