Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rchacon/e6638f15665a6d612b68b495548da818 to your computer and use it in GitHub Desktop.
Save rchacon/e6638f15665a6d612b68b495548da818 to your computer and use it in GitHub Desktop.
Ubuntu 16.04 command line install android sdk
# create sdk folder
export ANDROID_HOME=/opt/android-sdk-linux
sudo mkdir -p $ANDROID_HOME
# install openjdk
sudo apt-get install openjdk-8-jdk
# download android sdk
cd $ANDROID_HOME
sudo wget https://dl.google.com/android/repository/tools_r25.2.3-linux.zip
sudo unzip tools_r25.2.3-linux.zip
cd tools
# install all sdk packages
sudo ./android update sdk --no-ui
# set path
export PATH=${PATH}:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools:$ANDROID_HOME/build-tools/25.0.2/
source /etc/profile
@rchacon
Copy link
Author

rchacon commented Jan 27, 2018

Install gradle

sudo apt-get install gradle

Install avd

$ANDROID_HOME/tools/bin/sdkmanager --install "system-images;android-27;google_apis;x86"
$ANDROID_HOME/tools/bin/avdmanager create avd -n myfirstavd -k "system-images;android-27;google_apis;x86"

Run emulator

$ANDROID_HOME/tools/emulator -avd myfirstavd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment