📌  相关文章
📜  安装 android studio - Shell-Bash (1)

📅  最后修改于: 2023-12-03 15:25:05.034000             🧑  作者: Mango

安装 Android Studio - Shell/Bash

If you are an Android developer, you need to install Android Studio on your computer to start developing your app. Android Studio is the official Integrated Development Environment (IDE) for Android application development. This tutorial will show you how to install Android Studio on Ubuntu using the CLI (Command Line Interface) and Shell/Bash script.

Prerequisites

Before you proceed with the installation of Android Studio, make sure that:

  • Your Ubuntu system is up-to-date.
  • You have a user account with administrative privileges.
  • You have command line access (Terminal).
Step 1 - Download Android Studio

The first step is to download the latest version of Android Studio from the official website. You can use the following command to download the file:

wget https://redirector.gvt1.com/edgedl/android/studio/ide-zips/2021.1.1.0/android-studio-2021.1.1.0-linux.tar.gz
Step 2 - Install Required Packages

Before installing Android Studio, you need to install some required packages. Use the following command to install the necessary packages:

sudo apt-get update
sudo apt-get install unzip lib32z1 lib32ncurses6 lib32stdc++6
Step 3 - Extract Android Studio

Once the download is complete, extract the downloaded archive with the following command:

tar -xvf android-studio-2021.1.1.0-linux.tar.gz
Step 4 - Install Android Studio

After the extraction process completes, move the extracted folder to the /opt directory using the following command:

sudo mv android-studio /opt/
Step 5 - Set Environment Variables

To launch Android Studio from the command line, you need to set some environment variables. Use the following commands to set the environment variables:

echo 'export ANDROID_HOME=/opt/android-studio/sdk' >> ~/.bashrc
echo 'export PATH=$PATH:$ANDROID_HOME/tools' >> ~/.bashrc
echo 'export PATH=$PATH:$ANDROID_HOME/platform-tools' >> ~/.bashrc
Step 6 - Launch Android Studio

Finally, to launch Android Studio, enter the following command in your Terminal:

/opt/android-studio/bin/studio.sh

You can now start developing your Android apps using Android Studio.

Conclusion

In this tutorial, you have learned how to install Android Studio on Ubuntu using Shell/Bash script. You can now start developing your Android apps using Android Studio. Happy coding!