'How to start an android emulator in ubuntu 16.04?

I have android sdk installed, I've looked up directions which say to run ~/android-sdk-linux/tools/android and then click on a tools menu, but there is no tools menu.

I've also tried downloading virtual machine manager, but when I started that emulator it said I needed to insert an sd card.

How do I start an android emulator on ubuntu 16.04?



Solution 1:[1]

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.

Solution 2:[2]

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

Solution 3:[3]

Run

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

to start in AVD manager mode.

Solution 4:[4]

  1. Change directory using: cd /Path/to/Sdk/tools

  2. Start emulator using: sudo ./emulator -avd NAME_OF_YOUR_DEVICE

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Prashant Abdare
Solution 2
Solution 3 Diego Torres Milano
Solution 4 Ryan M