How To Install Android Studio on Ubuntu?

How To Install Android Studio on Ubuntu?

   

This post was last updated on August 1st, 2020 at 02:56 pm

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.

Previous How To Change Username In Linux/Unix From The Terminal?
Next How To Backup And Restore Ubuntu Using Timeshift?

About author

You might also like

How To 0 Comments

How To Setup NFS In Ubuntu 20.04 LTS?

This post was last updated on August 1st, 2020 at 12:22 pmNFS or Network file system is a distributed filesystem protocol. It allows a remote host to mount filesystem over

How To 0 Comments

How To Backup And Restore Ubuntu Using Timeshift?

This post was last updated on August 1st, 2020 at 02:53 pmA system backup is a process in which the state, files, and data of a computer system are copied

Installation 0 Comments

Compaq Smart-2/E Array Controller

This post was last updated on May 27th, 2020 at 05:15 pm Contents1 Spare# 194752-001 Assembly# 194771-001 Option# 194751-0012 Hardware Setup:3 Software Install:4 Module Options5 Building a new Initrd6 Updating

0 Comments

No Comments Yet!

You can be first to comment this post!

Leave a Reply