How to start an android emulator in ubuntu 16.04?

For Ubuntu 16.04 you need to download few things first.

After installing Android Studio.

Goto Tools > Android > AVD Manager > Create new virtual device

follow standard installation for new virtual device.

After Creating virtual device

Goto Tools > Android > SDK Manager > SDK Tools and check Android emulator enter image description here

Give it a try,if it still doesn't work you need add few libraries.

Goto terminal and execute below commands

sudo apt-get install lib64stdc++6:i386

sudo apt-get install mesa-utils

cd YOURPATH/Android/Sdk/emulator/lib64

mv libstdc++/ libstdc++.bak

ln -s /usr/lib64/libstdc++.so.6 libstdc++

This should start your emulator.


Run

~/android-sdk-linux/tools/android avd

to start in AVD manager mode.


Copy the name of the device that you want to run and then:

cd ~/Android/Sdk/tools && ./emulator -avd NAME_OF_YOUR_DEVICE

In my case:

cd ~/Android/Sdk/tools && ./emulator -avd Nexus_5X_API_23