Set up Android Studio on debian 7 wheezy 64-bit

Now that Android Studio is the official IDE for Android, you can set it up on your development box running debian 7 wheezy 64-bit as follows:

  1. Get Android studio from here

    cd /tmp
  2. Unzip it to /opt:

    cd /tmp
    sudo mv android-studio /opt
  3. Install OpenJDK 7 JDK:

    sudo apt-get install openjdk-7-jdk
  4. Set up the required environmental variable

    export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64
  5. Set up 32-bit libraries to avoid the error:

    Downloading android-sdk_r22.6.2-linux.tgz from
    Unpacking android-sdk_r22.6.2-linux.tgz
    tar xzvfC /tmp/AndroidStudio1254025343410050340FirstRun/android-sdk_r22.6.2-linux.tgz /tmp/AndroidStudio1254025343410050340FirstRun/android-sdk_r22.6.2-linux.tgz-unpacked
    Unable to run mksdcard SDK tool.

    as follows:

    sudo dpkg --add-architecture i386
    sudo apt-get update
    sudo apt-get install i32-libs
  6. Start Android studio: