How To Install Android Studio on Ubuntu?


Android studio is the official IDE for android application development by Google. It is based on JetBrains’ IntelliJ IDEA software. Android studio has various features such as Gradle build support, android specific refactoring and quick fixes, built-in support for google cloud platform, etc.

It also includes AVD (an emulator) to run and debug apps quickly. Ahead in this article, we will see the installation of the android studio in Ubuntu, Linux Mint or a distribution based on them.

Installing JDK

Android studio requires JDK 8 or above to be installed in your system. So before you install it in your system you need to install JDK 8 or above. Use the following command to install the latest version OpenJDK-

sudo apt-get install default-jdk

This will include JRE in it. Or follow this guide to install JDK in Ubuntu.

Now you can verify the installation with the following command –

java --version

Installing Android studio by using the snappy package manager

Snappy is a package manager developed by Canonical for Linux OS. Packages used by this package manager are called snaps. Snaps themselves have no dependencies on any app store. It provides better package management. To install snappy package manager in your system use the following command in your system-

sudo apt install snapd snapd-xdg-open

If it says that the package already installed then you can move to the next step.

Now to install android studio in your system, Use the following command in your terminal –

sudo snap install android-studio --classic

Once the download and installation of android studio gets complete you will see output something like this in your terminal-

android-studio 3.6.1.0 from Snapcrafters installed

Installing android studio from .tar.gz package

First, you need to download.tar.gz archive containing Android studio from the android developers website. This method of installation probably works on any system but you have to manually extract it somewhere and the updates are also not easy. To extract and install android studio follow the given steps –

1. Navigate to the directory where the package is downloaded –

cd Download/

2. Unpack the downloaded package to the directory where you want to install it –

tar xfz android-studio*.tar.gz -C <location>

The recommended installation location according to filesystem hierarchy standard is /opt now to install android studio into this directory use the following command –

sudo tar xfz android-studio*.tar.gz -C /opt/

3. Now change the directory to the bin subdirectory of the android studio–

cd /opt/android-studio*/bin

4. Then run the following command in your terminal to start the android studio-

./studio.sh

And this will start opening android studio like this –

Conclusion

It could download some extra packages while setting the android studio for the first time. Now you can start developing applications for the android platform on Ubuntu or a distribution based on them.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.