Android Studio is an official Integrated Development Environment (IDE) for Android app development, based on IntelliJ IDEA. Despite of IntelliJ’s powerful code editor and developer tools, Android Studio offers even more features that enhance your productivity while building Android apps. In this tutorial we will learn How to Install Android SDK on CentOS 8.
First, Update you system using the following command:
dnf -y update
Second, Android SDK requires Java 8 in the system. Install Java 8 using the following command:
yum install java-1.8.0-openjdk.x86_64
![](https://unixcop.com/wp-content/uploads/2022/04/image-184.png)
Verify your Java Installation using the following command:
java -version
![](https://unixcop.com/wp-content/uploads/2022/04/image-185.png)
Now, we will set Java Environment Variables like JAVA_HOME. Use the following command to set the environment variables:
cp /etc/profile /etc/profile_backup
echo ‘export JAVA_HOME=/usr/lib/jvm/jre-1.8.0-openjdk’ | sudo tee -a /etc/profile
echo ‘export JRE_HOME=/usr/lib/jvm/jre’ | sudo tee -a /etc/profile
source /etc/profile
![](https://unixcop.com/wp-content/uploads/2022/04/image-186.png)
Verify the environment variables using the following command:
echo $JAVA_HOME
echo $JRE_HOME
![](https://unixcop.com/wp-content/uploads/2022/04/image-187.png)
Install Android SDK:
Create the following directory:
mkdir /usr/local/android-sdk/
cd /usr/local/android-sdk/
Now download the zip file of Android SDK using the following command:
curl https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip -o android-sdk.zip
![](https://unixcop.com/wp-content/uploads/2022/04/image-188.png)
Now, Unzip the file using the following command:
unzip android-sdk.zip -d .
![Install Android SDK on CentOS 8](https://unixcop.com/wp-content/uploads/2022/04/image-189.png)
Remove the zip file as we do not need it now.
rm android-sdk.zip
Update tools / packages in the android sdk using the following command:
./tools/bin/sdkmanager "tools"
Check all available and installed packages using the following command:
./tools/bin/sdkmanager --list
![](https://unixcop.com/wp-content/uploads/2022/04/image-190.png)
Most importantly, run the following command to accept the Android SDK License:
./tools/bin/sdkmanager --licenses
![](https://unixcop.com/wp-content/uploads/2022/04/image-191.png)
Android SDK is successfully setup on your system you can now build your apk files using Android SDK on CLI.