How to install Android Studio in Ubuntu Linux 13.10 64-bit
Android Studio is a new Android development environment based on IntelliJ IDEA. Similar to Eclipse with the ADT Plugin, Android Studio provides integrated Android developer tools for development and debugging. Though it is a earlier access preview release, my experience with Android Studio has been very good so far.
Android official document clearly gives steps to install Android Studio on Linux. Still it needs some tweaks to install on recent version of Ubuntu 13.04. So I am here to summarize the simple steps to get it done. If you are familiar with basic Android Studio and JAVA installation and looking for tweak specific to Ubuntu 64-bit edition, jump to Step-6.
Step-1: Download Android Studio from Android Developer Portal. You can download the pre-built binary package from here. Let’s say it is android-studio-bundle-130.737825-linux.tgz. You can save it some where under your home directory. Let’s say it is ~/Development. Go to this directory.
Step-2: Install Android Studio. Installation is nothing but extracting the the downloaded package.
$ tar zxvf android-studio-bundle-130.737825-linux.tgz.
Now you should find android-studio directory. Installation is done.
Step-3: Time to download Java. If you haven’t installed java in your Ubuntu (check it by issuing “java” command in prompt. If it says no such command, then you need to install it by downloading from Oracle portal. Visit Oracle Java SE Download page, and download Java Platform (JDK) version of Linux x64 .tar.gz from the list of download options.
Step-4: Now install Java by extracting the downloaded package (let’s say it is jdk-7u45-linux-x64.tar.gz) in ~/Development.
$ tar zxvf jdk-7u45-linux-x64.tar.gz
Now you should find jdk<version> directory under ~/Development directory.
Step-5: Running the Android Studio. Just run the android studio binary with JAVA_HOME directory as environment variable from command line. Let’s say the present working directory of command shell is android-studio/bin directory.
$ JAVA_HOME=~/Development/jdk<version> ./studio.sh
Now you should be shown a banner and welcome dialog of Android Studio.
If this is the last step of this post, I would have not written this post at all. Here are some tweaks you need to run the android platform tools which are 32-bit binary. Before Ubuntu 11.10, there was a package called ia32-libs in Ubuntu repository, which provided 32-bit binary compatibility. Since 11.10 it is obsolete. Ubuntu started supporting Multi Arch feature, which is nothing but you can mention the architecture of package while installing. You may face the following error while issuing the command below.
bash: ./adb: No such file or directory
It shows that you need to fix this issue. You can confirm that you are running a 32-bit binary by typing “$ file ./adb” in command shell.
Step-6: Now it is time to install the dependent 32-bit packages. Issue the following commands to install these 32-bit packages.
$ sudo apt-get install –reinstall libc6-i386
$ sudo apt-get install libncurses5:i386
$ sudo apt-get install libstdc++6:i386
The above packages should fix the error in running adb tool.