Installing Android Studio 2 on 64-bit Ubuntu

Android Studio 2 is definitely a brilliant, modern and interesting technology! ^__^

Unfortunately, I faced a few setup issues mainly related to dynamic libraries on my 64-bit Ubuntu 16 system - so, I’m going to describe my experience in a step-by-step tutorial.

Install the required 32-bit libraries

A few libraries are needed by the SDK, as explained on the SDK website; to install them, run this terminal command:

sudo apt-get install lib32z1 lib32ncurses5 lib32stdc++6

Install mesa-utils

It seems that the Android SDK employs glxinfo; if it is not available, you might notice errors when starting the emulator.

To install glxinfo and other tools, run:

sudo apt-get install mesa-utils

Reference system libraries

The Android emulator crashed on startup - more precisely, the issue was due to hardware rendering; however, in lieu of switching to software rendering (which is slower and might not completely address the problem), these steps are suggested:

Edit $HOME/.profile

Add the following line:

export ANDROID_EMULATOR_USE_SYSTEM_LIBS=1

To quickly and globally apply the changes, you could log out of the desktop environment and re-log