---
title: "Step-by-Step Getting Started with Android Studio on Ubuntu"
description: "Learn how to get started with Android Studio on Ubuntu with this step-by-step tutorial on installing and configuration!"
canonical: "https://adamtheautomator.com/android-studio/"
---

# Step-by-Step Getting Started with Android Studio on Ubuntu

> Learn how to get started with Android Studio on Ubuntu with this step-by-step tutorial on installing and configuration!

Source: https://adamtheautomator.com/android-studio/

---

ATA Learning

Tap to hide

[

ATA Learning

](/)

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Search for:  

*   [](https://twitter.com/adbertram)
*   [](https://github.com/Adam-the-Automator)
*   [](https://www.linkedin.com/company/adam-the-automator-llc)
*   [](/feed/)

![Step-by-Step Getting Started with Android Studio on Ubuntu](https://adamtheautomator.com/wp-content/uploads/2022/06/Step-by-Step-Getting-Started-with-Android-Studio-on-Ubuntu.jpg)

# Step-by-Step Getting Started with Android Studio on Ubuntu

[![](https://secure.gravatar.com/avatar/2788bb1a3f735603f81eca51d68daec56a9d97e805a10268fb2c20afcc76b81b?s=192&d=mm&r=g)Nicholas Xuan Nguyen](https://adamtheautomator.com/author/nicholas-xuan-nguyen/)7 July 20226 min. read

Categories: [IT Ops](/category/it-ops/)

Tags:[Android Studio](/tag/android-studio/)[Ubuntu Linux](/tag/ubuntu-linux/)

Table of Contents

*   [Prerequisites](#prerequisites)
*   [Installing Java JDK](#installing-java-jdk)
*   [Install Android Studio from the Official Repository](#install-android-studio-from-the-official-repository)
*   [Installing Android Studio Using the Snap Tool](#installing-android-studio-using-the-snap-tool)
*   [Starting Android Studio for the First Time](#starting-android-studio-for-the-first-time)
*   [Creating Your First Android Project](#creating-your-first-android-project)
*   [Conclusion](#conclusion)

Have you been fascinated by the apps you see on your Android phone? Why not create one yourself? [Android Studio](https://developer.android.com/studio) on your Ubuntu machine is just what you need.

Android Studio is the official Integrated Development Environment (IDE) for developing Android apps by Google. Building a mobile app on a local computer may sound complicated. But don’t worry. In this tutorial, you’ll learn how to get started with Android Studio.

Sounds interesting? Dive in and build your own Android apps in no time!

## Prerequisites

This tutorial will be a hands-on demonstration. If you’d like to follow along, be sure you have A Linux Ubuntu system – This tutorial uses Ubuntu 20.04.

Related:[How to Install Ubuntu 20.04 \[Step-by-Step\]](https://adamtheautomator.com/install-ubuntu/)

## **Installing Java JDK**

Android Studio delivers blazing-fast tools so you can build apps on every type of Android device. But before jumpstarting your journey with Android Studio, you first have to install [Java](https://adamtheautomator.com/install-maven-on-ubuntu/) Development Kit (JDK) since Android Studio is written in Java.

Related:[Automate your Java Builds and Install Maven on Ubuntu](https://adamtheautomator.com/install-maven-on-ubuntu/)

To install the OpenJDK version of the JDK:

1\. Open your terminal and run the [apt update](https://linuxize.com/post/how-to-use-apt-command/#updating-package-index-apt-update) command below to update your system’s package index.

```bash
apt update -y
```

![Updating the System’s Package Index](https://adamtheautomator.com/wp-content/uploads/2022/06/image-755.png)

Updating the System’s Package Index

2\. Next, run the following [apt install](https://linuxize.com/post/how-to-use-apt-command/#installing-packages-apt-install) command to install the OpenJDK package (openjdk-11-jdk).

```bash
apt install openjdk-11-jdk -y
```

![Installing the OpenJDK Package](https://adamtheautomator.com/wp-content/uploads/2022/06/image-756.png)

Installing the OpenJDK Package

3\. Finally, run the below java command to check the Java version installed on your machine.

```bash
java --version
```

Below, the version installed is 11.0.15, but yours might differ depending on the JDK release.

![Checking Java Version Installed](https://adamtheautomator.com/wp-content/uploads/2022/06/image-757.png)

Checking Java Version Installed

## Install Android Studio from the Official Repository

After installing Java, you’re one step closer to mastering Android Studio. But of course, you still have to install Android Studio on your machine. You can install Android Studio, either from the official repository or via the snap tool.

But it’s always a good idea to install software from official repositories whenever possible, so you’ll receive updates automatically when they become available.

To add the Android Studio repository:

1\. Run the [add-apt-repository](https://linuxize.com/post/how-to-add-apt-repository-in-ubuntu/) command below to add Android Studio’s official repository to your system.

The `ppa` flag indicates the repository is a Personal Package Archive (PPA), a way for individual developers to distribute software directly to users.

```bash
add-apt-repository ppa:maarten-fonville/android-studio
```

When prompted, press Enter to confirm adding the repository, as shown below.

![Adding Android Studio’s Repository to the System](https://adamtheautomator.com/wp-content/uploads/2022/06/image-758.png)

Adding Android Studio’s Repository to the System

2\. After adding the repository, run the following command to update the local package index to include the contents of the new repositories.

```bash
apt update -y
```

![Updating the Local Package Index to Include the Contents of the New Repositories](https://adamtheautomator.com/wp-content/uploads/2022/06/image-759.png)

Updating the Local Package Index to Include the Contents of the New Repositories

3\. Lastly, run the [apt-cache](https://www.computerhope.com/unix/apt-cache.htm) command below to verify that the android-studio repository has been added successfully.

```bash
apt-cache policy
```

![Verifying the Android Studio’s Repository is Added](https://adamtheautomator.com/wp-content/uploads/2022/06/image-760.png)

Verifying the Android Studio’s Repository is Added

4\. Now, run the below command to install android-studio and all the necessary dependencies via the official repository.

```bash
apt install android-studio -y
```

![Installing Android Studio on Ubuntu](https://adamtheautomator.com/wp-content/uploads/2022/06/image-761.png)

Installing Android Studio on Ubuntu

## **Installing Android Studio Using the Snap Tool**

If you’re not a fan of adding a PPA to your source list, you can install Android Studio using the snap package instead.

Android Studio’s snap package indeed contains an application and all its dependencies. But remember, your Android Studio version might be slightly outdated as the snap package is usually a few releases behind the PPA. Choose wisely!

To install Android Studio using the Snap tool:

1\. Run the apt install command below to install snap on your system if you don’t have snap installed on your system yet.

```bash
apt install snapd -y
```

![Install Snap on the System](https://adamtheautomator.com/wp-content/uploads/2022/06/image-762.png)

Install Snap on the System

2\. Next, run the snap refresh command below to update the list of available snap packages.

```bash
snap refresh
```

![Updating List of Available Snap Packages](https://adamtheautomator.com/wp-content/uploads/2022/06/image-763.png)

Updating List of Available Snap Packages

3\. Run the following command to install android-studio on your machine. This command pulls all the dependencies required to run Android Studio.

```bash
snap install android-studio
```

You might get a restriction error, as shown below. This error suggests that Android Studio can make changes to the system that could put your system at risk. This issue is common with snaps that are not confined to the security sandbox.

![Getting a Restriction Error](https://adamtheautomator.com/wp-content/uploads/2022/06/image-764.png)

Getting a Restriction Error

4\. If you trust the Android Studio snap, run the following command instead to install Android Studio. The –classic flag allows snap to perform any system changes required as a traditional package.

```bash
snap install android-studio --classic
```

![Installing Android Studio Using the Snap Tool](https://adamtheautomator.com/wp-content/uploads/2022/06/image-765.png)

Installing Android Studio Using the Snap Tool

## Starting Android Studio for the First Time

Now that you have Android Studio installed on your machine, it’s time to launch Android Studio and set it up for the first time. Setting up Android Studio is similar to setting up other software on Ubuntu.

1\. Search for Android Studio in the Dash or Applications menu, and click on the Android Studio icon to launch it.

![Launching Android Studio](https://adamtheautomator.com/wp-content/uploads/2022/06/image-766.png)

Launching Android Studio

2\. Select the Do not import settings option on the initial window, and click OK since it’s your first time setting up Android Studio on your Ubuntu system. The other option is for when you are upgrading from a previous version of Android Studio.

![Choosing not to Import Settings](https://adamtheautomator.com/wp-content/uploads/2022/06/image-767.png)

Choosing not to Import Settings

You can see below that Android Studio searches for available SDKs and configures itself for first use.

![Viewing Android Studio Configures Itself for First Use](https://adamtheautomator.com/wp-content/uploads/2022/06/image-768.png)

Viewing Android Studio Configures Itself for First Use

3\. On the Welcome page, select Don’t send if you prefer not to send feedback at this time. Or choose the Send usage statistics to Google option otherwise, and click Next.

As new features become available in preview versions of Android Studio, you’ll be asked to send feedback about those features directly to Google.

![Opting Out from Sending Feedback](https://adamtheautomator.com/wp-content/uploads/2022/06/image-769.png)

Opting Out from Sending Feedback

> _You can turn the Data Sharing feature later off or on by going to Settings —> Appearance & Behavior —> System Settings —> Data Sharing._

4\. Now, select the Standard installation option to use recommended settings for most users, and click Next.

![Selecting Standard Installation](https://adamtheautomator.com/wp-content/uploads/2022/06/image-770.png)

Selecting Standard Installation

5\. Select your preferred UI theme, and click Next.

**Darcula** or **Light**? Dark themes have been popular these days, but the choice is entirely up to you.

![Select a UI Theme](https://adamtheautomator.com/wp-content/uploads/2022/06/image-771.png)

Select a UI ThemeSelect a UI Theme

6\. Verify your settings, and click **Next**.

You can click on **Previous** if you need to change any settings.

![Verify your settings and click Next. ](https://adamtheautomator.com/wp-content/uploads/2022/06/image-772.png)

Verify your settings and click Next.

7\. Choose the **Accept** option to accept the license agreement terms, and click **Finish**.

![Accepting the License Agreement](https://adamtheautomator.com/wp-content/uploads/2022/06/image-773.png)

Accepting the License Agreement

As you can see below, Android Studio starts downloading and installing the required components, which may take a few minutes to complete.

![Downloading Required Components](https://adamtheautomator.com/wp-content/uploads/2022/06/image-774.png)

Downloading Required Components

8\. Finally, click **Finish** to finalize the installation process.

![Finalizing the Installation Process](https://adamtheautomator.com/wp-content/uploads/2022/06/image-775.png)

Finalizing the Installation Process

After setting up Android Studio, you’ll see a welcome screen with a few options to get you started, as shown below.

![Viewing the Welcome Screen](https://adamtheautomator.com/wp-content/uploads/2022/06/image-776.png)

Viewing the Welcome Screen

## Creating Your First Android Project

Now that Android Studio is running, it’s time to create your first Android project. Android Studio supports all programming languages of [IntelliJ](https://www.jetbrains.com/idea/) (and [CLion](https://www.jetbrains.com/clion/)), like [Java](https://www.java.com/en/), [C++](https://en.wikipedia.org/wiki/C%2B%2B), and [Go](https://go.dev/).

But for a start, you’ll create a project with a default template:

1\. Click on New Project on the welcome screen to start a new Android Studio project.

![Starting a New Project](https://adamtheautomator.com/wp-content/uploads/2022/06/image-777.png)

Starting a New Project

2\. Under Templates, select Empty Activity under Phone and Tablet, and click Next. This template is empty since your focus is on “getting started” with Android Studio.

![Selecting an Empty Template for a Project](https://adamtheautomator.com/wp-content/uploads/2022/06/image-778.png)

Selecting an Empty Template for a Project

3\. Configure the project template with the following:

*   **Name** – Give your application a descriptive name. But for this tutorial, the project name is **My First Application**.
    
*   **Save location** – Use the default location or choose a different location to save your project.
    
*   **Language** – Choose the language you want to use for your project (**Java**).
    
*   **Minimum SDK** level – Choose the minimum API level your app will support. The lower the API level, the more devices your app can run on. The lowest API level is 16, which covers around 95% of all Android devices at this moment of writing.
    
*   Click **Finish** to create your project.
    

![Configuring the Project](https://adamtheautomator.com/wp-content/uploads/2022/06/image-779.png)

Configuring the Project

After creating your project, Android Studio takes time to sync the project sources. Once synced, you’ll see the following main files generated automatically on the left panel:

*   The app —> manifests —> AndroidManifest.xml file contains all metadata about your app, such as package name, app name, version, etc.

![Viewing the AndroidManifest.xml File](https://adamtheautomator.com/wp-content/uploads/2022/06/image-780.png)

Viewing the AndroidManifest.xml File

*   The app —> java —> MainActivity.xml file contains your app’s main activity.

![Viewing MainActivity.xml File](https://adamtheautomator.com/wp-content/uploads/2022/06/image-781.png)

Viewing MainActivity.xml File

*   The app —> res —> values > strings.xml file contains all string constants used in your app. You can edit these values to change the text displayed in your app.

![Viewing the strings.xml File](https://adamtheautomator.com/wp-content/uploads/2022/06/image-782.png)

Viewing the strings.xml File

4\. Now, [enable USB debugging](https://www.makeuseof.com/tag/what-is-usb-debugging-mode-on-android-makeuseof-explains/) and Install via USB on your Android device.

![Enabling USB Debugging](https://adamtheautomator.com/wp-content/uploads/2022/06/image-783.png)

Enabling USB Debugging

5\. Connect your phone to your computer via a USB cable, and choose Transfer file / Android Auto, as shown below.

![Choosing USB Connection](https://adamtheautomator.com/wp-content/uploads/2022/06/image-2.jpeg)

Choosing USB Connection

6\. Tap on **ALLOW** on your phone if you get the prompt shown to accept your machine’s RSA key fingerprint.

![Accepting RSA Key Fingerprint](https://adamtheautomator.com/wp-content/uploads/2022/06/image-3.jpeg)

Accepting RSA Key Fingerprint

7\. Next, press Shift+F10 while on the Android Studio to run your application.

![Running the Application](https://adamtheautomator.com/wp-content/uploads/2022/06/image-784.png)

Running the Application

If the run is successful, you’ll see a Launch succeeded message (bottom-left). Your application automatically gets installed on your phone but takes some time.

![Application](https://adamtheautomator.com/wp-content/uploads/2022/06/image-785.png)

Application

8\. Finally, look for your application on your phone and launch it.

![Launching the Application](https://adamtheautomator.com/wp-content/uploads/2022/06/image-4.jpeg)

Launching the Application

Congratulations! Your first Android app is now running on your phone, as shown below.

![Testing the Android Application on Mobile Phone](https://adamtheautomator.com/wp-content/uploads/2022/06/image-786.png)

Testing the Android Application on Mobile Phone

## Conclusion

In this tutorial, you’ve gone through getting started with Android Studio, from installing the software on your Ubuntu machine to creating your first Android app. Even though you’ve created your app with an empty template, don’t limit yourself, and try other templates.

At this point, you already have a working development environment and your first Android app. Why not add features to your app? Or perhaps [start developing a new app](https://www.youtube.com/watch?v=FjrKMcnKahY) and [publish it on the Google Play Store](https://developer.android.com/studio/publish)?

Share this article

[Share on X](https://twitter.com/intent/tweet?url=https%3A%2F%2Fadamtheautomator.com%2Fandroid-studio%2F&text=Step-by-Step%20Getting%20Started%20with%20Android%20Studio%20on%20Ubuntu)[Share on Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fadamtheautomator.com%2Fandroid-studio%2F)[Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fadamtheautomator.com%2Fandroid-studio%2F)

## Related Posts

![](https://adamtheautomator.com/wp-content/uploads/2024/03/openldap-4.jpg)

### [How to Install and Configure an OpenLDAP Ubuntu Server](/openldap/)

Unlock the power of OpenLDAP on Ubuntu for centralized user authentication, seamless access control management, and enhanced directory services!

![](https://adamtheautomator.com/wp-content/uploads/2024/03/ubuntu-ntp.jpg)

### [How to Setup Ubuntu NTP Server](/ubuntu-ntp/)

Learn to configure an Ubuntu NTP server for precise time synchronization across your network. Ensure seamless operations with accurate timekeeping!

![](https://adamtheautomator.com/wp-content/uploads/2022/04/How-to-Install-Apache-on-Ubuntu.jpg)

### [Install Apache on Ubuntu and Master Website Traffic Management](/install-apache-on-ubuntu/)

Ready to optimize your website for high traffic? Install Apache on Ubuntu with this step-by-step guide and ensure smooth performance under heavy loads.

## Categories

*   [IT Ops](/category/it-ops/)
*   [Cloud](/category/cloud/)
*   [DevOps](/category/devops/)
*   [Home Ops](/category/home-ops/)
*   [Information Security](/category/infosec/)
*   [Software Development](/category/software-development/)

## Site

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Copyright 2026© ATA Learning | [Privacy Policy](/privacy/)
