Install Android SDK on CentOS 8

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

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 

Verify your Java Installation using the following command:

java -version

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

Verify the environment variables using the following command:

echo $JAVA_HOME
echo $JRE_HOME

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

Now, Unzip the file using the following command:

unzip android-sdk.zip -d .
Install Android SDK on CentOS 8
Install Android SDK on CentOS 8

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

Most importantly, run the following command to accept the Android SDK License:

./tools/bin/sdkmanager --licenses

Android SDK is successfully setup on your system you can now build your apk files using Android SDK on CLI.

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"
Mel
Melhttps://unixcop.com
Unix/Linux Guru and FOSS supporter

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest articles

Join us on Facebook