在 Ubuntu 和 Linux Mint 中轻松安装 Android Studio
Android Eclipse
[Android Studio](http://developer.android.com/sdk/installing/studio.html) 是谷歌自己的 Android 开发 IDE，是带 ADT 插件的 Eclipse 的不错替代品。Android Studio 可以通过源代码安装，但在这篇文章中，我们将看到**如何在 Ubuntu 18.04、16.04 和相应的 Linux Mint 变体**中安装 Android Studio。


在继续安装 Android Studio 之前，请确保你已经[在 Ubuntu 中安装了 Java](https://itsfoss.com/install-java-ubuntu-1404/)。


![How to install Android Studio in Ubuntu](/data/attachment/album/201805/10/224829sscqqgz4q4m2scf2.jpg)


### 使用 Snap 在 Ubuntu 和其他发行版中安装 Android Studio


自从 Ubuntu 开始专注于 Snap 软件包以来，越来越多的软件开始提供易于安装的 Snap 软件包。Android Studio 就是其中之一。Ubuntu 用户可以直接在软件中心找到 Android Studio 程序并从那里安装。


![Install Android Studio in Ubuntu from Software Center](/data/attachment/album/201805/10/224830t48s84415w8zlz4s.jpg)


如果你在软件中心安装 Android Studio 时看到错误，则可以使用 [Snap 命令](https://itsfoss.com/install-snap-linux/) 安装 Android Studio。



```
sudo snap install android-studio --classic

```

非常简单！


### 另一种方式 1：在 Ubuntu 中使用 umake 安装 Android Studio


你也可以使用 Ubuntu Developer Tools Center，现在称为 [Ubuntu Make](https://wiki.ubuntu.com/ubuntu-make)，轻松安装 Android Studio。Ubuntu Make 提供了一个命令行工具来安装各种开发工具和 IDE 等。Ubuntu Make 在 Ubuntu 仓库中就有。


要安装 Ubuntu Make，请在终端中使用以下命令：



```
sudo apt-get install ubuntu-make

```

安装 Ubuntu Make 后，请使用以下命令在 Ubuntu 中安装 Android Studio：



```
umake android

```

在安装过程中它会给你的几个选项。我认为你可以处理。如果你决定卸载 Android Studio，则可以按照以下方式使用相同的 umake 工具：



```
umake android --remove


```

### 另一种方式 2：通过非官方的 PPA 在 Ubuntu 和 Linux Mint 中安装 Android Studio


感谢 [Paolo Ratolo](https://plus.google.com/+PaoloRotolo)，我们有一个 PPA，可用于 Ubuntu 16.04、14.04、Linux Mint 和其他基于 Ubuntu 的发行版中轻松安装 Android Studio。请注意，它将下载大约 650MB 的数据。请注意你的互联网连接以及数据费用（如果有的话）。


打开一个终端并使用以下命令：



```
sudo apt-add-repository ppa:paolorotolo/android-studio
sudo apt-get update
sudo apt-get install android-studio

```

这不容易吗？虽然从源代码安装程序很有趣，但拥有这样的 PPA 总是不错的。我们看到了如何安装 Android Studio，现在来看看如何卸载它。


### 卸载 Android Studio：


如果你还没有安装 PPA Purge：



```
sudo apt-get install ppa-purge

```

现在使用 PPA Purge 来清除已安装的 PPA：



```
sudo apt-get remove android-studio
sudo ppa-purge ppa:paolorotolo/android-studio

```

就是这些了。我希望这能够帮助你**在 Ubuntu 和 Linux Mint 上安装 Android Studio**。在运行 Android Studio 之前，请确保[在 Ubuntu 中安装了Java](https://itsfoss.com/install-java-ubuntu-1404/ "How To Install Java On Ubuntu 14.04")。在类似的文章中，我建议你阅读[如何安装和配置 Ubuntu SDK](https://itsfoss.com/install-configure-ubuntu-sdk/) 和[如何在 Ubuntu 中轻松安装 Microsoft Visual Studio](https://itsfoss.com/install-visual-studio-code-ubuntu/)。


欢迎提出任何问题或建议。再见 ：）




---


via: <https://itsfoss.com/install-android-studio-ubuntu-linux/>


作者：[Abhishek Prakash](https://itsfoss.com/author/abhishek/) 选题：[lujun9972](https://github.com/lujun9972) 译者：[geekpi](https://github.com/geekpi) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
![Warp Terminal](/assets/images/warp-terminal.webp)


![Warp Terminal](/assets/images/warp-terminal.webp)

[Android Studio](https://developer.android.com/studio?ref=itsfoss.com), 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](https://itsfoss.com/android-emulators-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](https://itsfoss.com/qemu-ubuntu/), for better performance.- A screen resolution of 1920 x 1080 or more

[Java installed in Ubuntu](https://itsfoss.com/install-java-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](https://itsfoss.com/content/images/2024/01/android-studio-in-ubuntu-software-center.png)

If you see an error while installing Android Studio from Software Center, you can use the [Snap commands](https://itsfoss.com/install-snap-linux/) to install Android studio.

```
sudo snap install android-studio --classic
```


### 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](https://plus.google.com/+PaoloRotolo?ref=itsfoss.com), and [maarten-fonville](https://github.com/mfonville/android-studio?ref=itsfoss.com) 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](https://itsfoss.com/ppa-guide/) 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.](https://itsfoss.com/content/images/2024/01/download-android-studio-files-from-official-website.png)

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.](https://itsfoss.com/content/images/2024/01/accept-terms-and-conditions-to-start-download.png)

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](https://linuxhandbook.com/basic-tar-commands/?ref=itsfoss.com). 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](https://itsfoss.com/content/images/2024/01/extract-android-studio-tar-file.png)

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.](https://itsfoss.com/content/images/2024/01/open-a-terminal-inside-the-extracted-folder.png)

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.](https://itsfoss.com/content/images/2024/01/do-not-import-settings-android-studio.png)

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

![Asking to Share usage statistics with Google](https://itsfoss.com/content/images/2024/01/asking-for-usage-data.png)

Now, on the welcome screen, click on Next.

![Click the Next button on the first page of the setup wizard](https://itsfoss.com/content/images/2024/01/click-on-next-on-the-setup-wizard.png)

Set the installation type as Standard and click Next.

![Set the installation type as Standard, which will be sufficient for a normal user.](https://itsfoss.com/content/images/2024/01/set-install-type-as-standard-and-click-next.png)

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.

![Verify the settings and click Next to start downloading the required files and setting up.](https://itsfoss.com/content/images/2024/01/verify-the-settings-and-cick-next.png)

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

![Accept Android SDK License](https://itsfoss.com/content/images/2024/01/accept-android-sdk-license.png)

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.](https://itsfoss.com/content/images/2024/01/accept-android-sdk-arm-dbt-license.png)

On the next screen, click on the Finish button.

![Click on Finish Settings to Complete the Initial setup](https://itsfoss.com/content/images/2024/01/finish-settings-on-setup-wizard.png)

[enable KVM to achieve better performance](https://itsfoss.com/qemu-ubuntu/).

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](https://itsfoss.com/content/images/2024/01/downloading-files-by-setup.png)

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

![Click the Finish button to complete the setting up.](https://itsfoss.com/content/images/2024/01/click-on-finish-to-complete-the-setup.png)

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.](https://itsfoss.com/content/images/2024/01/click-on-create-a-desktop-entry.png)

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](https://itsfoss.com/content/images/2024/01/create-desktop-entry-press-ok.png)

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

![Open Android Studio from Ubuntu Activities Overview](https://itsfoss.com/content/images/2024/01/open-android-studio-from-activities-overview.png)

### 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](https://itsfoss.com/content/images/2024/01/click-on-check-for-updates.png)

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

![Running the latest version of Android Studio notification](https://itsfoss.com/content/images/2024/01/running-latest-version-of-android-studio.png)

### Removing Android Studio

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

```
sudo rm /usr/share/applications/jetbrains-studio.desktop
```


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.

`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](https://itsfoss.com/install-java-ubuntu/) first. In similar posts, I advise you to read [how to install and configure the Ubuntu SDK](https://itsfoss.com/install-configure-ubuntu-sdk/) and [how to install Microsoft Visual Studio easily in Ubuntu](https://itsfoss.com/install-visual-studio-code-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 AppsThe best open source Android apps. Replace the proprietary options to enjoy a potentially better experience!](https://itsfoss.com/open-source-android-apps/)![](https://itsfoss.com/content/images/2023/02/best-foss-android-apps.png)


![](https://itsfoss.com/content/images/2023/02/best-foss-android-apps.png)

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

[6 Best Android Emulators to Run & Test Android Apps on LinuxWant to run Android on Linux? These Android emulators and solutions should help!](https://itsfoss.com/android-emulators-linux/)![](https://itsfoss.com/content/images/2023/04/best-android-emulators-for-linux.png)


![](https://itsfoss.com/content/images/2023/04/best-android-emulators-for-linux.png)