1. Download android studio
  2. Untar it to /opt/android-studio
  3. Symlink /opt/android-studio/bin/studio.sh to /usr/local/bin/android-studio
  4. Download oracle’s java
  5. Untar it to /opt/oracle-java
  6. (Ubuntu) Symlink /opt/oracle-java to /usr/lib/jvm/default-java
  7. (Ubuntu) Symlink /opt/oracle-java/bin/java to /usr/bin/java

If you have a 64-bit system, you’ll need to install 32-bit libraries:

# On ubuntu
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6