📅  最后修改于: 2023-12-03 15:25:05.034000             🧑  作者: Mango
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.
Before you proceed with the installation of Android Studio, make sure that:
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
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
Once the download is complete, extract the downloaded archive with the following command:
tar -xvf android-studio-2021.1.1.0-linux.tar.gz
After the extraction process completes, move the extracted folder to the /opt
directory using the following command:
sudo mv android-studio /opt/
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
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.
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!