Android Studio (3.0) Emulator Not Working After Th

2019-06-16 21:06发布

问题:

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.

回答1:

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

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.



回答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:

Solution:

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


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



回答3:

Have you tried wiping the data before launch?



回答4:

Go to Settings/Advanced/OpenGL ES renderer

and enabling SwiftShader instead Autodetect worked for me.



回答5:

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