Setting up Android Studio

Android Studio is the Google IDE for Android based on Intellij IDEA announced at 2013 Google I/O. Currently is available in an early access preview that, even if not completely stable, is worth a try.

Here I report what I have done to install it on a Linux Debian-based (actually Ubuntu) box, then I'll write about how I developed a first "Hello world" application.

Download

On android.com, I went to the Android Studio page. There I found links to specific Android Studio bundles for three different platforms, Windows, Mac OS X, Linux. I clicked on the Linux one, and I patiently waited the 400 Meg package to be downloaded on my machine. At the time I have written this post, the current version was 0.2.2.

Install

The bundle was actually a compressed tarball, named "android-studio-bundle-130.737825-linux.tgz". I moved it to someplace looked right to me, and expanded it by a call to tar xvfz. Anything was put in the folder android-studio. Under its bin directory there is a shell script, studio.sh, that we need to call to run the IDE.

Theoretically speaking, that's it.

Still, I have experience a couple of issues. The minor one was solved installing Gradle "by hand", getting it from the official gradle.org download page. The other came from adb, the Android Debug Bridge, that had a couple of dependencies not resolved at runtime. It logged that the problem was about curses, but when I ran ldd on it, I saw that where reported as not found both libncurses.so.5 and libstdc++.so.6. In my case this was due to the fact that I am on a 64 bit system, while adb is a 32 bit application. This was the solution:
sudo apt-get install lib32ncurses5 lib32stdc++6

No comments:

Post a Comment