8

Emulator is not starting. I just updated the Android Studio nothing was done other than that.

The below notifications show up and nothing happens when I run the Emulator.

enter image description here

Amal p
  • 2,882
  • 4
  • 29
  • 49

5 Answers5

2

Symptom:

Emulator not launching or starting.

Errors:

Emulator: Process finished with exit code 0
Or
Emulator: Process finished with exit code 1
Or
Emulator: Process finished with exit code 2


Cause (in Linux):

As Google seems to be not aware of the problem, on every update they make to the Android Emulator package in Android Studio, they break the funcionality replacing your working SDK C++ libs with the broken/older ones.

Solution:

Create a simlink to the lib distributed with Ubuntu:

cd ~/Android/Sdk/emulator/lib64/libstdc++/

mv libstdc++.so.6 libstdc++.so.6.bak

mv libstdc++.so.6.0.18 libstdc++.so.6.0.18.bak

ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.6 ~/Android/Sdk/emulator/lib64/libstdc++/libstdc++.so.6

ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22 ~/Android/Sdk/emulator/lib64/libstdc++/libstdc++.so.6.0.22

Cause (in Windows):

Android Emulator not installed: enter image description here

Solution:

Install Android Emulator if it's not installed on SDK Manager > SDK Tools:

enter image description here


References:

1) Android Emulator is not running on Android Studio 3.0

2) Emulator on Android Studio doesn't start after SDK tools update to 25.3.1

3) Cannot launch emulator on Linux (Ubuntu 15.10)

4) https://issuetracker.google.com/issues/37075150

  • True, but if you notice the OpenGL ES errors you'll know this is something else. If it doesn't boot it doesn't show a bunch of OpenGL ES errors (I had the problem where the emulator doesn't boot myself). OP asks a question about what appears to be an emulator crash, not it not booting – Zoe Jan 08 '18 at 15:47
  • @Zoe OP: Emulator is not starting. –  Jan 08 '18 at 15:53
  • Wrong. The emulator is starting, but crashing. True, that means it isn't starting, but the linked question is for when it doesn't have **any kind of response**. As in pressing the launch button and nothing happens. The emulator crashes, meaning the emulator component of the SDK has to be present for it to happen – Zoe Jan 08 '18 at 15:54
  • Yes that's true –  Jan 08 '18 at 15:56
2

Have you tried wiping the data before launch?

enter image description here

Fracdroid
  • 1,135
  • 10
  • 15
1

First off, try setting the OpenGL ES version to automatic in the emulator by going to "Emulated Performance" under the emulator settings:

https://i.stack.imgur.com/uiLd7.png

Alternatively, it could be a problem with a file in the SDK. From what I can find, this is mostly a problem with the linux based operating systems. There is a specific file you need, that you may need to manually install (which you probably need). So first off, installing it:

If you have a 32 bit system:

# apt-get install lib64stdc++6

Or a 64 bit system with multiarch enabled:

# apt-get install lib64stdc++6:i386

And then, move the file:

$ cd $ANDROID_HOME/sdk/tools/lib64/libstdc++
$ mv libstdc++.so.6 libstdc++.so.6.bak
$ ln -s /usr/lib64/libstdc++.so.6 $ANDROID_HOME/sdk/tools/lib64/libstdc++

Note that the actual path you use could be different depending on $ANDROID_HOME. And make sure you set ANDROID_HOME to the location of the SDK before you do this, otherwise you have to type the full path to the SDK.

Zoe
  • 27,060
  • 21
  • 118
  • 148
1

Go to Settings/Advanced/OpenGL ES renderer

and enabling SwiftShader instead Autodetect worked for me.

Enabled SwiftShader

maros136
  • 326
  • 5
  • 7
-2

you should install android emulator because it become Separated API n SDK Manager > SDK Tools: and install it

alacoo
  • 135
  • 1
  • 1
  • 6