Skip to content
This repository was archived by the owner on Oct 30, 2022. It is now read-only.
This repository was archived by the owner on Oct 30, 2022. It is now read-only.

Install Android Studio #19

Description

@phanect
#!/bin/bash

set -eu

echo "deb http://ftp.debian.org/debian jessie-backports main" | sudo tee /etc/apt/sources.list.d/backports.list

sudo apt-get update > /dev/null
sudo apt-get install -y openjdk-8-jdk lib32z1 lib32ncurses5 lib32stdc++6 # lib32bz2-1.0

curl --silent --output /tmp/android-studio.zip https://dl.google.com/dl/android/studio/ide-zips/2.1.2.0/android-studio-ide-143.2915827-linux.zip

# TODO unzip android studio

. ~/.profile
. ~/.bashrc

if [ -z "$(echo "$PATH" | grep "/opt/android-studio/bin" )" ] || \
  [ -z "$(echo "$PATH" | grep "/Android/Sdk/tools" )" ] || \
  [ -z "$(echo "$PATH" | grep "/Android/Sdk/platform-tools" )" ]; then
  echo -e "\nexport PATH=$PATH:/opt/android-studio/bin:~/Android/Sdk/tools/:~/Android/Sdk/platform-tools" >> ~/.bashrc
  echo -e "\nexport ANDROID_HOME=~/Android/Sdk" >> ~/.bashrc
fi

studio.sh # Open Android Studio GUI and install Android SDK

echo y | android update sdk --all --no-ui --filter tools
echo y | android update sdk --all --no-ui --filter platform-tools
echo y | android update sdk --all --no-ui --filter build-tools-24.0.0
echo y | android update sdk --all --no-ui --filter android-23 # Android 6.0.x
echo y | android update sdk --all --no-ui --filter android-22 # Android 5.1.x
echo y | android update sdk --all --no-ui --filter sys-img-x86_64-android-23
echo y | android update sdk --all --no-ui --filter sys-img-x86_64-android-22
echo y | android update sdk --all --no-ui --filter sys-img-x86-android-23
echo y | android update sdk --all --no-ui --filter sys-img-x86-android-22
echo y | android update sdk --all --no-ui --filter extra-android-m2repository # for Cordova
echo y | android update sdk --all --no-ui --filter extra-google-play_billing # for In-app billing

# TODO Create AVD

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions