Setting Up Android Studio for Ubuntu
If you're an Ubuntu user looking to set up Android Studio, this guide will walk you through the process step by step. By the end, you'll have Android Studio up and running on your Ubuntu machine, ready for your Android development projects. Let's get started!
Step 1: Download the Installation File
The first thing you need to do is download the Android Studio installation file. You can find it on the official Android Studio website at https://developer.android.com/studio. Once you're on the website, simply download the tar.gz file.
Step 2: Install Android Studio to the Opt Path
After you've downloaded the installation file, open your terminal and run the following command:
sudo tar -xzf android-studio*.tar.gz -C /opt
This command will extract the contents of the tar.gz file and install Android Studio to the /opt
directory.
If you're using a 64-bit version of Ubuntu, you'll need to install some additional libraries before proceeding. Run the following command to install the required libraries:
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386
Step 3: Launch Android Studio
To launch Android Studio, open a terminal and navigate to the ~/opt/android-studio/bin/
directory. Once you're in the
directory, execute the following command:
./studio.sh
This will launch Android Studio and you'll be ready to start your Android development journey.
Step 4: Create a Shortcut to Launch Android Studio
If you want to make it easier to launch Android Studio in the future, you can create a shortcut. Open a text editor and
create a new file called open-android-studio.sh
. Copy and paste the following code into the file:
#!/bin/bash
cd /opt/android-studio/bin
./studio.sh
Save the file and make it executable by running the following command in the terminal:
chmod +x open-android-studio.sh
Now, whenever you want to launch Android Studio, simply run the open-android-studio.sh
script.
Step 5: Setting Up the Android Emulator
If you're interested in setting up the Android Emulator on your Ubuntu machine, you can find a guide on how to do that in our other article, [setup-android-emulator-for-ubuntu].
That's it! You've successfully set up Android Studio on your Ubuntu machine. Happy coding!