2

Android Emulator not working with Api 27 and give me this error :

    5:36 PM Emulator: init: Could not find wglGetExtensionsStringARB!

    5:36 PM Emulator: emulator: ERROR: Missing initial data partition file: C:\Users\ACER\.android\avd\Nexus_5_API_27_1.avd/userdata.img

    5:36 PM Emulator: getGLES2ExtensionString: Could not find GLES 2.x config!

    5:36 PM Emulator: Failed to obtain GLES 2.x extensions string!

    5:36 PM Emulator: Could not initialize emulated framebuffer

    5:36 PM Emulator: emulator: ERROR: Could not initialize OpenglES emulation, use '-gpu off' to disable it.

    5:36 PM Emulator: Process finished with exit code -1073741819 (0xC0000005)

    5:51 PM Emulator: qemu-system-i386.exe: Unable to open C:\Users\ACER\.android\avd\Galaxy_Nexus_API_25.avd\data\misc\pstore\pstore.bin: Permission denied

    5:51 PM Emulator: Process finished with exit code 0

The Graphic settings is Automatic, when I choose Software Graphics the emulator just show blank screen.

Ayat Khrisat
  • 130
  • 2
  • 15
  • What version of Android Studio are you using and on what OS? – Yuliwee Dec 29 '17 at 16:19
  • ِAndroid Studio 3.0.1, Windows 10 pro – Ayat Khrisat Dec 29 '17 at 16:21
  • Possible duplicate of [Error while Running Android Application - Could not initialize OpenglES emulation, use '-gpu off' to disable it](https://stackoverflow.com/questions/30686324/error-while-running-android-application-could-not-initialize-opengles-emulatio) – Martin Zeitler Jan 03 '18 at 21:52

2 Answers2

3

it clearly reads ERROR: Could not initialize OpenglES emulation, use '-gpu off' to disable it. which means, you can either use the command-line switch -gpu off in order to render with "Software GLES", or just upgrade your graphics card and / or install an openGL driver.

see the release notes, there are two new command-line switches: -gpu swiftshader_indirect and -gpu angle_indirect. while this question probably is missing a tiny detail: which CPU, how much RAM and which graphics adapter are you using ?? unless having appropriate hardware available, you have to un-tick that "Use Host Gpu" checkbox.

Martin Zeitler
  • 1
  • 19
  • 155
  • 216
  • Thanks, you really saved my day. It was a bit weird after the update, I usually ran my emulator without the `gpu` switch and worked fine till I update it. After I got the error, I tried using `-gpu off` switch but the performance of my emulator dropped quite a lot, but by using the `-gpu switftshader_indirect`, my emulator seems smoother. Do you know the reason? – nanangarsyad Feb 27 '18 at 12:29
  • @Nanangarsyad that is because `-gpu off` is a pure software rasterizer (most likely rendering directly) - and `-gpu switftshader_indirect` is the SwiftShader OpenGL ES driver, with indirect rendering (both run on the CPU, not the GPU). see https://swiftshader.googlesource.com/SwiftShader – Martin Zeitler Mar 02 '18 at 11:19
-1

You could try to use the Genymotion Emulator instead. Maybe this (temporarily) solves your problem.

Mario
  • 353
  • 1
  • 5
  • 17
  • and how does this directly relate to the question? there are tons of these "use Genymotion" answers, while the OP didn't ask for alternatives. It's off-topic alike "I have a Windows problem" - "you could install Linux". – Martin Zeitler Mar 02 '18 at 11:25
  • That's why I said it's only a temporary solution. There were no other answers, so I thought a quick way to solve the problem would be to switch the emulator. Sorry that I tried to be helpful. Gosh! – Mario May 03 '18 at 17:27