Android Studio is an app development platform built by Google that allows developers to access the latest APIs and features for Android app development. Debian 12 is a favorable platform for Android Studio as it comes with all the necessary libraries and tools to run Android Studio smoothly.
How To Install Android Studio Debian 12
To install Android Studio on Debian 12, this blog post will discuss two ways in detail. One is using Andriod Studio Tar file and the other is using the Snap package installer. The newer version of Android Studio by default comes with JDK but to be on the safer side you can install it by executing the below command:
sudo apt install openjdk-17-jdk
Installing Android Studio on Debian Using Tar File
The first method to install Android Studio on Debian 12 is by using its tar file. This method is beneficial in case you need to get your hands on its latest version. To get the Android Studio tar file visit its Download page and click on the Android Studio download button:
Next, agree to the terms and conditions of use for Android Studio and then click on Download to proceed:
Alternatively, you can download the tar file on Debian 12 using the download link and wget utility in the terminal:
wget https://redirector.gvt1.com/edgedl/android/studio/ide-zips/2023.3.1.19/android-studio-2023.3.1.19-linux.tar.gz
Now once the file is downloaded extract it using the tar utility by executing:
sudo tar -xzf android-studio-2023.3.1.19-linux.tar.gz
Once the file is extracted simply execute the .sh file of Android Studio on Debian 12 which you can find in the bin directory of the extracted file:
./android-studio/bin/studio.sh
Since launching Android Studio by executing the terminal command can be a tiresome process you can create its desktop launcher. For that first create an android.desktop file in the Debian 12 using any of the text editors:
./android-studio/bin/studio.sh
Next, add the following lines of code given below in the file. Just set the desired path for the execution and icon image:
[Desktop Entry]
Version= 3.1.19
Type=Application
Name=Android Studio
Exec=/home/arnold/Downloads/android-studio/bin/
Icon=/home/arnold/Downloads/android-studio/bin/studio.svg
Categories=Development;IDE;
Terminal=false
StartupNotify=true
StartupWMClass=jetbrains-android-studio
Name[en_GB]=android-studio.desktop
After that save the file and exit:
Disclaimer: Now using this method I was unable to create a desktop icon for it, also I tried creating a desktop entry as well via Android Studio keymap options but still it didn’t create the desktop application. Most of the other blogs have only written the commands but haven’t shown if the method works or not. Last but not least the video tutorials are quite old as well so no help from them as well.
Installing Android Studio on Debian Using Snap Package Manager
The next method for installing Android Studio on Debian 12 is by using Snap package manager which is the third-party app installer for Debian-based Linux distributions. To install Android Studio on Debian 12 simply execute the following command:
sudo snap install android-studio --classic
Now to launch Android Studio on Debian 12 installed via Snap package installer execute:
sudo snap run android-studio
Note: If you are using Snap package installer for Android Studio installation on Debian then you do not need to create a desktop icon for it as it is automatically created.
How to set up Android Studio on Debian 12
On the first launch of Android Studio, you will have to setup and configure the Android Studio using the Android Studio setup wizard, so here are some steps that you will have to go through:
Step 1: Import Android Studio Settings
At first, it will ask about importing any settings which is useful if you were using Android Studio previously and want to continue with those settings. Otherwise, select Do not import settings and proceed further by clicking on OK:
Step 2: Permission For Sending Usage Data
Next, a pop-up will appear asking you to send Android Studio usage data. You can select the relevant option based on your preference:
Step 3: Setup for Android Studio Development Environment
Now the installation of the development environment for Android Studio will be started so here first click on Next to proceed with its installation:
Now if you are using Android Studio for basic utilities then go with the standard installation or if you are focusing on using limited use then select the Custom installation and select the desired settings and components:
Once you are done with selecting the setup type for the Android Studio development environment then click on Next and verify the installations and settings. Afterward, click on Next to proceed with the installation:
Next, accept the terms and conditions for licenses and proceed to the next step:
Once you are done click on Finish:
Now all the necessary files will be downloaded and installed. However, this might take a while around 5 to 10 minutes. If it is not proceeding even after 15 minutes then try installing the latest version of OpenJDK which I have mentioned at the start:
Now you are ready to use Android Studio on Debian 12:
Conclusion
Android Studio on Debian 12 can be installed through two ways one is by using its tar file and the other is by Snap package installer. The best way to install Android Studio on Debian is by using the Snap package manager as you do not need to create a desktop application for it and it requires only one command execution for installation. However, if you use the Tar file method you need to create its desktop launcher manually but using the Tar file you can get hands-on its latest version