Software Projects

Installing the Android SDK from the Command Line

Posted in Uncategorized by rmt on July 24, 2012

Updated 2019-05-17

These commands are for installing the Android SDK command line tools without installing Android Studio.

(Ubuntu 18.04)

sudo apt-get install openjdk-8-jre-headless
sudo apt-get install openjdk-8-jdk
wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
mkdir android-sdk
unzip sdk-tools-linux-4333796.zip -d android-sdk
yes | android-sdk/tools/bin/sdkmanager "platform-tools" "platforms;android-28" "build-tools;28.0.3" "extras;android;m2repository" "emulator"

echo 'export ANDROID_HOME=/home/$USER/android-sdk' >> /home/$USER/.bashrc
echo 'export PATH=$PATH:$ANDROID_HOME/emulator' >> /home/$USER/.bashrc
echo 'export PATH=$PATH:$ANDROID_HOME/tools' >> /home/$USER/.bashrc
echo 'export PATH=$PATH:$ANDROID_HOME/tools/bin' >> /home/$USER/.bashrc
echo 'export PATH=$PATH:$ANDROID_HOME/platform-tools' >> /home/$USER/.bashrc
echo 'export PATH=$PATH:$ANDROID_HOME/build-tools/28.0.3' >> /home/$USER/.bashrc

echo 'export TMPDIR=/tmp' >> /home/$USER/.bashrc
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s