Steps for Installing SDK

3 min read
Last updated at: Jul 07 2021

Developers Installation Prerequisite

1. INSTALL JAVA
>In terminal
>sudo apt-get update
>sudo apt-get install openjdk-8-jdk
>java -version (check if its properly installed)

2. INSTALL ANDROID STUDIO
>Install android studio from ubuntu
>Make sure to give the path right
>Install the necessary platforms, build tools

3. ADD PATHS TO THE ENVIROINMENT
>In terminal
>sudo gedit /etc/profile
>In the end of the profile give these paths
export PATH=$PATH:$ANDROID_HOME/bin

export PATH=$PATH:$ANDROID_HOME/tools

export PATH=$PATH:$ANDROID_HOME/platform-tools

export ANDROID_HOME=(Give the path of your sdks location)

export ANDROID_SDK=/home/nithin/android-sdk => this is a example of how you give the path for your sdk

export ANDROID_SDK_ROOT=/home/nithin/android-sdk

 

JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64"

PATH=$PATH:$HOME/bin:$JAVA_HOME/bin

export JRE_HOME

export PATH

>After this save and close profile then in terminal enter this
>source /etc/profile
>Restart the PC then Check if the path is properly set
>echo $ANDROID_HOME

4. INSTALL GRADLE
>In terminal enter and run the below command
>wget https://services.gradle.org/distributions/gradle-5.0-bin.zip -P /tmp
>sudo unzip -d /opt/gradle /tmp/gradle-*.zip
>Check if the gradle is properly extracted by running this command
>ls /opt/gradle/gradle-5.0
>Now set path for gradle
>sudo nano /etc/profile.d/gradle.sh
>It will open a window paste the following code and save it
export GRADLE_HOME=/opt/gradle/gradle-5.0

export PATH=${GRADLE_HOME}/bin:${PATH}

>Then run the following commands
>sudo chmod +x /etc/profile.d/gradle.sh
>source /etc/profile.d/gradle.sh
>Check if the gradle is installed
>gradle -v