1

I've downloaded Android Studio 2.3.3 and currently, I'm trying to run basic Hello World activity which is automatically generated. When I try to launch emulator, it does not launch.

Is it a known bug or just wrong configuration? I was also surprised that there is just version 2.3.3 for Linux.

Jakub Gruber
  • 745
  • 1
  • 11
  • 27

2 Answers2

2

The emulator comes with a bundled libstdc++.so file. In some cases the bundled file is not compatible with your system. Using the libstdc++.so.6 that is available in your system instead of the one bundled with the Android SDK may solve this issue.

To use the system's libstdc++.so file, edit the .profile file, located in your home folder, and append this at the end of the file:

export ANDROID_EMULATOR_USE_SYSTEM_LIBS=1

From the documentation of Android Studio Environment Variables reference:

Contains a value of 0 (default) or 1. A value of 1 means to use the system's libstdc++.so file instead of the one that comes bundled with the emulator. Set this environment variable only when the emulator does not start on your Linux system because of a system library problem. For example, some Linux Radeon GL driver libraries require a more recent libstdc++.so file.

Note:

There is no guarantee that setting this environment variable to 1 will make the emulator runnable. It is a work-around for system library issues that affect a very small number of Linux users.

Community
  • 1
  • 1
user1801374
  • 378
  • 1
  • 10
1

Option -gpu swiftshader_indirect helps me in my case. Full command to start emulator

/android_sdk/tools/emulator @NEXUS_API_27 -verbose -no-boot-anim -gpu swiftshader_indirect

Where NEXUS_API_27 name of virtual device. You can get it here:

/android_sdk/tools/bin/avdmanager list avd
nxdrvr
  • 67
  • 4