Install Android Studio on Red Hat Enterprise Linux

Android Studio is the official Integrated Development Environment (IDE) for building Android apps. It provides a comprehensive set of tools to ease the development process. In this article we will discuss two methods to install Android Studio on a Red Hat Enterprise Linux (RHEL) system.

Install Android Studio on Red Hat Enterprise Linux

  • Method 1: Using the official source package
    • Step 1: Install dependencies
    • Step 2 : Download Android Studio
    • Step 3 : Extract archive
    • Step 4 : Moving files to proper installation directory.
    • Step 5 : Creating desktop entry.
    • Step 6 : Launch android studio.
  • Method 2 : Using flatpak
    • Step 1 : Setup flatpak and flathub
    • Step 2 : Install Android Studio
    • Step 3 : Launching Android Studio

Method 1: Using the official source package

Step 1: Install dependencies

In order to install Android Studio from the Tarball package, we will need to download the required dependencies using the yum install command as follows :

sudo yum install glibc.i686 glibc-devel.i686 libstdc++.i686  ncurses-devel.i686 libX11-devel.i686 libXrender.i686 libXrandr.i686

installing dependencies

Step 2 : Download Android Studio

Download android studio archive from official source. Go to official android studio page and download it from there.

downloading android studio

Step 3 : Extract archive

Once download is complete, we will extract archive using tar -zxvf command. First navigate to Download directory using cd command, and later we will use tar -zxvf command to extract archive.

 cd Downloads/ 

sudo tar -zxvf android-studio-*-linux.tar.gz

extracting android studio

Step 4 : Moving files to proper installation directory.

Once extraction is complete, we can move android studio directory to /opt directory to use it as a program. We will use mv command for that.

  sudo mv android-studio /opt/

now we will link android studio execution as follows

sudo ln -sf /opt/android-studio/bin/studio.sh /usr/local/bin/android-studio

moving android studio to opt

Step 5 : Creating desktop entry.

Now, final step. We will create desktop entry for android studio icon for ease of use using gedit.

 sudo gedit /usr/share/appications/android-studio.desktop

After this command new text editor window will open. Paste following in it and save and exit.

creating desktop entry using gedit

Step 6 : Launch android studio.

Now, we can launch android studio from application menu by simply clicking on android studio icon.

android studio launching

Method 2 : Using flatpak

Step 1 : Setup flatpak and flathub

First we will need to install flatpak in our system if it is not already installed using yum install command.

sudo yum install flatpak

Once flatpak is installed. We can now add flathub repo to our system using flatpak remote-add command as follows.

sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo

setting up flathub repo

Step 2 : Install Android Studio

Once flatpak and flathub is setup, we can install Android Studio using flatpak instsall command as follows.

flatpak install flathub com.google.AndroidStudio

installing android studio using flathub

Step 3 : Launching Android Studio

Once installation is finished, we can launch android studio from application menu by simply clicking on android studio icon.

launching android studio

Install Android Studio on Red Hat Enterprise Linux – FAQs

How do I keep Android Studio updated?

If you used Method 2, simply run flatpak update regularly. For Method 1, download the latest archive again, extract it and move to /opt/ directory.

Can I use same steps on REHL based distributions?

Yes. These steps will work on any REHL based distributions like Fedora Opensuse Linux etc.

What is Flatpak?

Flatpak is a software packaging format that bundles applications and dependencies.

Conclusion

In this article, we’ve explored two methods for installing Android Studio on REHL. For most users, using the flatpak and flathub is the recommended approach. This method offers a straightforward installation, ensures compatibility with your system, and provides regular updates. However, if you require a specific version or prefer more customization, first method alternative option.