I'm having trouble starting my android emulator. Nothing appears to load.
Pixel 2 API 26 Android 8.0 x86.
Linux Ubuntu 16.04 LTS 64-bit.
12/10/17 2:20 PM Emulator: libGL error: unable to load driver: vmwgfx_dri.so
2:20 PM Emulator: libGL error: driver pointer missing
2:20 PM Emulator: libGL error: failed to load driver: vmwgfx
2:20 PM Emulator: libGL error: unable to load driver: swrast_dri.so
2:20 PM Emulator: libGL error: failed to load driver: swrast
2:20 PM Emulator: X Error of failed request: BadValue (integer parameter out of range for operation)
2:20 PM Emulator: Major opcode of failed request: 155 (GLX)
2:20 PM Emulator: Minor opcode of failed request: 24 (X_GLXCreateNewContext)
2:20 PM Emulator: Value in failed request: 0x0
2:20 PM Emulator: Serial number of failed request: 33
2:20 PM Emulator: Current serial number in output stream: 34
2:20 PM Emulator: Process finished with exit code 1
These are known errors from libGL and libstdc++
You can quick fix this by change to use Software
for Emulated Performance Graphics
option, in the AVD settings.
Or try to use the libstdc++.so.6
(which is available in your system) instead of the one bundled inside Android SDK. There are 2 ways to replace it:
The emulator has a switch
-use-system-libs
. You can found it here:~/Android/Sdk/tools/emulator -avd Nexus_5_API_23 -use-system-libs
.This option force Linux emulator to load the system
libstdc++
(but not Qt libraries), in cases where the bundled ones (from Android SDK) prevent it from loading or working correctly. See this commitAlternatively you can set the
ANDROID_EMULATOR_USE_SYSTEM_LIBS
environment variable to1
for youruser/system
.This has the benefit of making sure that the emulator will work even if you launched it from within Android Studio.
See: libGL error and libstdc++: Cannot launch AVD in emulator - Issue Tracker
In AVD Manager -> Edit -> Show Advanced Settings -> Boot Options (Selct Cold boot). That fixed my issue
Android make the default avd files in the C:\Users\[USERNAME]\.android directory. Just make sure you copy the avd folder from this directory C:\Users\[USERNAME]\.android to C:\Android\.android. My problem was resolved after doing this.
Check android studio event log as it could be low storage issue.
emulator: ERROR: Not enough disk space to run AVD 'Nexus_5_API_21'. Exiting...
This worked for me on Windows 10:
Step 1: Close Android Studio
Step 2: Create a new environment-variable:
variable-name: ANDROID_SDK_HOME
variable-value: C:\Users\[USERNAME]\.android
Step 3: Start Android Studio
OBS!
Android Studio will create the default avd-files in C:\Users\[USERNAME]\.android
Go To AVD Manager, Click On The "Down Arrow" Next to The AVD Device that is showing this error, Click on "Show on Disk". Now Delete These Two Files "Cache.img" & "cache.img.qcow2" ..
Works Perfectly Fine For me.
There might be several reasons for this.
- first of all, check whether the legacy mode is enabled in your bios
settings. if it is not enabled, ensure to make it enabled in BIOS settings.
- and then In AVD Manager -> Edit -> Show Advanced Settings -> Boot Options (Select Cold boot). That fixed my issue. I hope it will fix your problem.
Sometimes things need a system restart (in my case).
My issue resolved
- May be you do not have enough space to create this virtual device (like in my case). if this happens, try to create space enough for this Virtual device.
OR
- Uninstall and re-install can solve this issue.
OR
- Restarting Android Studio can solve.
来源:https://stackoverflow.com/questions/47739777/android-studio-avd-emulator-process-finished-with-exit-code-1