how-to-install-android-studio-on-ubuntu-24-04-a-step-by-step-guide

How to Install Android Studio on Ubuntu 24.04: A Step-by-Step Guide

Android Studio is the official Integrated Development Environment (IDE) for Android app development, based on IntelliJ IDEA. It provides a robust environment for coding, testing, and deploying Android apps. This guide will walk you through the steps to install Android Studio on an Ubuntu system.

Prerequisites

Before we start, make sure your system meets the following requirements:

  • A 64-bit version of Ubuntu 18.04 or later
  • 4 GB RAM minimum, 8 GB RAM recommended
  • 2 GB of available disk space minimum, 4 GB recommended (500 MB for IDE + 1.5 GB for Android SDK and emulator system image)
  • A 64-bit CPU

Step 1: Install Java Development Kit (JDK)

Android Studio requires the Java Development Kit (JDK). To install it, open a terminal and execute the following commands:

sudo apt update
sudo apt install openjdk-11-jdk

To verify the installation, you can check the Java version:

java -version

Step 2: Download Android Studio

1. Download Android Studio

Go to the official Android Studio download page and download the latest version of Android Studio for Linux:

2. Extract and Install Android Studio

tar -xzf android-studio-*-linux.tar.gz
sudo mv android-studio /opt/
/opt/android-studio/bin/studio.sh

replace * with your downloaded android studio version.

Step 3: Configure Android Studio

When you run the studio.sh script, the Android Studio setup wizard will start. Follow these steps:

1. Welcome to Android Studio Setup: Click Next.

2. Install Type: Choose the Standard option for the default settings and click Next.

3. Verify Settings: Review your settings and click Next.

4. License Agreement: Choose Accept and Click Next

5. Emulator Settings: Click Finish

6. Downloading components: Now it will start to download components.

After downloading Finish button will appear . Click on Finish button.

7. Android Studio Welcome Window: Now it will appear with Android Studio Welcome window. Click on New Project.

8. Project: Now choose ‘No Activity’.

9. New Project Setup: Now it will ask you to create a project. Remain this as it is and click on Finish.

10. Completing Request Actions: Now, It will download and install SDK platforms

After downloading and Installing of SDK Platform click on Finish.

Step 4 : Launch the emulator in Android Studio

1. Android Studio window will open.

2. It will start to download packages. You can check these downloading packages on clicking left side button mention in the below image.

After finishing of downloading wait for the ‘BUILD SUCCESSFUL‘ message.

3. Now, click on ‘Device Manager’. Refer to the red arrow in the upper right side of the screenshot below.

It will show list of android emulator present on the Device Manager.

4. Click the “Play” button to launch the emulator.

5. Congratulations! Your emulator has successfully launched in Android Studio.

Step 5: Set Up Environment Variables

1. Open .bashrc File

vim ~/.bashrc

2. Add the Following Lines

export ANDROID_HOME=$HOME/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools

3. Apply the Changes

source ~/.bashrc

FAQ: Installing Android Studio on Ubuntu 24.04

  1. Q: How do I install Android Studio on Ubuntu 24.04?
    A: Follow the step-by-step guide in the article, which includes installing JDK, downloading Android Studio, extracting and installing it, and configuring the environment.
  2. Q: Can I install Android Studio on Ubuntu 24?
    A: Yes, the installation process for Ubuntu 24.04 should work for Ubuntu 24 as well.
  3. Q: How do I install the Android SDK on Ubuntu 24.04?
    A: The Android SDK is installed automatically when you install Android Studio. Follow the guide to install Android Studio, which includes the SDK.
  4. Q: Is there an Android emulator for Ubuntu 24.04?
    A: Yes, Android Studio includes an emulator. After installation, you can set up and run the emulator from within Android Studio.
  5. Q: How do I install Java for Android Studio on Ubuntu 24.04?
    A: Use the command sudo apt install openjdk-11-jdk to install the Java Development Kit.
  6. Q: Can I install Android Studio from a .tar.gz file on Ubuntu?
    A: Yes, the guide provides instructions for extracting and installing Android Studio from a .tar.gz file.
  7. Q: How do I set up ANDROID_HOME on Ubuntu?
    A: Add the following line to your ~/.bashrc file: export ANDROID_HOME=$HOME/Android/Sdk
  8. Q: Is there a way to install Android Studio using apt?
    A: Android Studio is not available in the default Ubuntu repositories. Follow the manual installation process described in the article.
  9. Q: How do I install Android Studio on Linux?
    A: The process for Ubuntu 24.04 described in this article should work for most Linux distributions, with minor adjustments if needed.
  10. Q: Can I develop Android apps on Ubuntu?
    A: Yes, installing Android Studio on Ubuntu allows you to develop Android applications.
  11. Q: How do I download Android Studio for Ubuntu?
    A: Visit the official Android Studio download page and select the Linux version.
  12. Q: How do I install Android Studio from the terminal?
    A: You can download the .tar.gz file and use terminal commands to extract and install it, as described in the article.
  13. Q: What if the Android Studio setup wizard is not downloading components?
    A: Ensure you have a stable internet connection. If issues persist, try restarting the setup wizard or check your firewall settings.
  14. Q: How do I set up the Android Studio environment variables on Ubuntu?
    A: Edit your ~/.bashrc file to include the necessary export commands for ANDROID_HOME and PATH, as shown in the article.
  15. Q: Can I install Android apps on Ubuntu?
    A: While Android Studio is for developing apps, you can run Android apps on Ubuntu using emulators or tools like Anbox.
  16. Q: How do I install Android Studio in Spanish? (Instalar Android Studio en Ubuntu)
    A: The installation process is the same regardless of language. You can change the language settings within Android Studio after installation.
  17. Q: How do I install Android Studio in Russian? (Установка Android Studio Ubuntu)
    A: Follow the same installation process, then change the language settings in Android Studio preferences.
  18. Q: What are the system requirements for Android Studio on Ubuntu?
    A: The article lists the prerequisites, including a 64-bit Ubuntu version, minimum 4GB RAM, and at least 2GB of available disk space.
  19. Q: How do I update Android Studio on Ubuntu?
    A: Android Studio typically notifies you of updates. You can also check for updates in the IDE under Help > Check for Updates.
  20. Q: How do I run the Android Studio setup wizard?
    A: The setup wizard runs automatically when you first launch Android Studio after installation.

Conclusion

Congratulations! You have successfully installed Android Studio on your Ubuntu system. You can now start developing Android applications using the powerful features of Android Studio. Happy coding!

Leave a Reply

Your email address will not be published. Required fields are marked *