[android] Android Studio AVD - Emulator: Process finished with exit code 1

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

This question is related to android android-studio android-emulator avd

The answer is


Open AVD manager and click on the drop down along side with your emulator and select the show in disk and delete the file with .lock extension. After deleted, run your emulator. That works for me.


For me there was a lack of space on my drive (around 1gb free). Cleared away a few things and it loaded up fine.


None of the solutions worked for me. I ended up downloading a different emulator image.

First I had arm64-v8a, which was giving this error. I download armeabi-v7a, which worked fine.

Unfortunately I was not able to install HAXM accelerator as organization's softwares were blocking the installation. Hence, had to go with arm.


This works to me:

click in Sdk manager in SDK Tools and: enter image description here

Unistal and install the Android Emulator: enter image description here

Hope to help!


Sometimes things need a system restart (in my case).


This can be solved by the following step:

Please ensure "Windows Hypervisor Platform" is installed. If it's not installed, install it, restart your computer and you will be good to go.

enter image description here


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.

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...


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.


I had same issue for windows , the cause of the problem was currupted or missing dll files. I had to change them.

In android studio ,

Help Menu -> Show log in explorer.

It opens log folder, where you can find all logs . In my situation error like "Emulator terminated with exit code -1073741515"

  1. Try to run emulator from command prompt ,
  • Go to folder ~\Android\Sdk\emulator

  • Run this command:

    emulator.exe -netdelay none -netspeed full -avd <virtual device name> 
    
    ex: emulator.exe -netdelay none -netspeed full -avd Nexus_5X_API_26.avd
    

    You can find this command from folder ~.android\avd\xxx.avd\emu-launch-params.txt

  1. If you get error about vcruntime140 ,
  • Search and download the appropriate vcruntime140.dll file for your system from the internet (32 / 64 bit version) , and replace it with the vcruntime140.dll file in the folder ~\Android\Sdk\emulator

  • Try step 1

  • If you get error about vcruntime140_1 , change the file name as vcruntime140_1.dll ,try step 1

  1. If you get error about msvcp140.dll
  • Search and download the appropriate msvcp140.dll file for your system from the internet (32 / 64 bit version)
  • Replace the file in the folder C:\Windows\System32 with file msvcp140.dll
  • Try step 1

If it runs , you can run it from Android Studio also.


I am using flutter and installed virtual device using the terminal

flutter emulator --launch {avd_name} -v

will print a more detailed output, making it easier for debugging the specific errors

Enabling the virtualization options in BIOS worked in my particular case (VDT)


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.


In AVD Manager -> Edit -> Show Advanced Settings -> Boot Options (Selct Cold boot). That fixed my issue


There might be several reasons for this.

  1. 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.
    1. 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.

Examples related to android

Under what circumstances can I call findViewById with an Options Menu / Action Bar item? How to implement a simple scenario the OO way My eclipse won't open, i download the bundle pack it keeps saying error log getting " (1) no such column: _id10 " error java doesn't run if structure inside of onclick listener Cannot retrieve string(s) from preferences (settings) strange error in my Animation Drawable how to put image in a bundle and pass it to another activity FragmentActivity to Fragment A failure occurred while executing com.android.build.gradle.internal.tasks

Examples related to android-studio

A failure occurred while executing com.android.build.gradle.internal.tasks "Failed to install the following Android SDK packages as some licences have not been accepted" error Android Gradle 5.0 Update:Cause: org.jetbrains.plugins.gradle.tooling.util This version of Android Studio cannot open this project, please retry with Android Studio 3.4 or newer WARNING: API 'variant.getJavaCompile()' is obsolete and has been replaced with 'variant.getJavaCompileProvider()' Flutter plugin not installed error;. When running flutter doctor ADB.exe is obsolete and has serious performance problems Android design support library for API 28 (P) not working Flutter command not found How to find the path of Flutter SDK

Examples related to android-emulator

flutter run: No connected devices How to remove the Flutter debug banner? Android Studio AVD - Emulator: Process finished with exit code 1 Android Studio Emulator and "Process finished with exit code 0" Run react-native on android emulator ERROR Android emulator gets killed Error while waiting for device: Time out after 300seconds waiting for emulator to come online Unfortunately Launcher3 has stopped working error in android studio? updating Google play services in Emulator Android Studio emulator does not come with Play Store for API 23

Examples related to avd

PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT (in windows 10) Android Studio AVD - Emulator: Process finished with exit code 1 Why AVD Manager options are not showing in Android Studio Run AVD Emulator without Android Studio Is Google Play Store supported in avd emulators? Error in launching AVD with AMD processor How do you install Google frameworks (Play, Accounts, etc.) on a Genymotion virtual device? Why emulator is very slow in Android Studio? Android Studio doesn't see device Running Google Maps v2 on the Android emulator