How to install Android Studio in linux


What is Android studio?


Android Studio is for developing Android mobile applications. It is the official IDE for Android app development, created by Google and its available for free on all operating systems.


Its comes with a testing framework, allowing app developers to run automated tests and test their app's functionality. It also includes a code editor and visual layout editor, also it has  plethora of templates.


One of the great thing of Android Studio is its ability to integrate  with other tools in the Android development ecosystem and manage Android apps all in one place.


if you're a  Android developer or just getting started, Android Studio is an essential tool for building high quality mobile apps.  it provides everything that you need to bring your ideas and make a big impact in the mobile app development.



Install android studio 


Download the latest version of Android Studio for Linux from their  official website


Extract the downloaded archive


Now run the studio.sh 


Follow the Setup Wizard to complete the installation process. You'll be asked to select a UI theme, whether to import previous settings, and whether to install the Android Virtual Device emulator etc.


Once the installation is complete, you can launch Android Studio from the terminal by running the studio.sh script.





Install android studio using apt



Add the official Android Studio package to  your apt


sudo add-apt-repository ppa:maarten-fonville/android-studio


update apt install install android studio by this following command


sudo apt update

sudo apt install android-studio



Install android studio using snap


make sure you installed snap

sudo apt install snapd

now install android studio using snap

sudo snap install android-studio --classic

you can launch Android Studio from the app menu or  studio.sh script in the /snap/android-studio/current/android-studio/bin/ directory



Install android studio using flatpak

make sure you installed flatpak

sudo apt install flatpak


Add  repository to flatpak


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

Now you can install by following command


flatpak install flathub com.google.AndroidStudio

you can launch Android Studio from the app menu or  studio.sh script in the /var/lib/flatpak/app/com.google.AndroidStudio/current/active/files/android-studio/bin/ directory



Install android studio using Sdkman


make sure you installed sdkman


curl -s "https://get.sdkman.io" | bash


source the sdkman script

source "$HOME/.sdkman/bin/sdkman-init.sh"

Install the  dependencies

sudo apt install openjdk-8-jdk
sudo apt install lib32z1 lib32ncurses5 lib32stdc++6

Now install by this command

sdk install android

you can launch android studio by using android command in terminal



Install in virtual machine


Download the Android x86 virtual machine image from this website 

While creating new machine select "Use an existing virtual hard disk file" and select the downloaded Android virtual machine image then configure the virtual machine settings and start the virtual machine

Thats all once the setup is complete, you can use Android Studio in the virtual machine



How to create android studio desktop icon in Linux

create new file in desktop directory this values

set your android studio path to exec

[Desktop Entry]

Type=Application

Name=Android Studio

Icon=/usr/local/android-studio/bin/studio.png

Exec=/usr/local/android-studio/bin/studio.sh

Comment=Integrated Development Environment for Android app development

Terminal=false

Categories=Development;IDE;