Android emulator - unable to load driver

Running on Ubuntu, I get this error:

Cannot launch AVD in emulator. Output: libGL error: unable to load driver: i965_dri.so libGL error: driver pointer missing libGL error: failed to load driver: i965 libGL error: unable to load driver: swrast_dri.so libGL error: failed to load driver: swrast X Error of failed request: GLXBadContext Major opcode of failed request: 155 (GLX) Minor opcode of failed request: 6 (X_GLXIsDirect) Serial number of failed request: 55 Current serial number in output stream: 54 

Platform tools are the latest.

The emulator image uses https://dl.google.com/android/repository/sys-img/google_apis/x86_64-24_r08.zip , and on Android N.

Update (December 2, 2016): @ Sébastien's solution no longer works, but gives:

 Cannot launch AVD in emulator. Output: failed to create drawable getGLES2ExtensionString: Could not create GLES 2.x Pbuffer! Failed to obtain GLES 2.x extensions string! Could not initialize emulated framebuffer emulator: Listening for console connections on port: 5554 emulator: Serial number of this emulator (for ADB): emulator-5554 emulator: ERROR: Could not initialize OpenglES emulation, use '-gpu off' to disable it. emulator: WARNING: ./android/metrics/metrics_reporter.cpp:142: Failed to get a writable, unused path for metrics. Tried: /home/me/.android/avd/metrics/metrics.17386.yogibear 

If I turn off GPU-based rendering and switch to software-based GL graphics, the following runtime error will appear:

 Firebase API initialization failure. DeadSystemException: The system died; earlier logs will point to the root cause FATAL EXCEPTION: main Process: com.whatever.mobile, PID: 4501 DeadSystemException: The system died; earlier logs will point to the root cause 
+5
source share
4 answers

Had the same problem and my fix was to set the following env variable:

export ANDROID_EMULATOR_USE_SYSTEM_LIBS = 1

In my case, I put it in ~ / .bashrc. When sending, I start the emulator, as usual, i.e. From the command line:

$ emulator -avd Nexus_4_API_23

It seems like this is a well-known issue tracked in an Android tracker: https://code.google.com/p/android/issues/detail?id=197254

+14
source

I ran into the same error and just deleted $ANDROID_HOME/tools/lib64/libstdc++/* for me. The version of libstdC ++ shipped with 16.10 (6.0.22) is larger than the version shipped with sdk tools (6.0.18), and I believe that it creates conflicts with other libraries.

+8
source

The problem is with l ibstdC ++. so.6 go to the Android SDK and can be resolved with the following command:

 cd ~/...../sdk/tools/lib64/libstdc++ mv libstdc++.so.6 libstdc++.so.6_OLD ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.6 libstdc++.so.6 

Credit: https://code.google.com/p/android/issues/detail?id=197254#c43

+3
source

I knew a lot about this question, the answer is correct, it’s just an application method that made me figure it out:

(like Root) I ran: locate libstdc ++. so.6

Then with the result of the list of the current lib WITH VERSION and LOCATION, I applied mv / rm for those that were sent with the Android SDK (~ / Android / Sdk / emulator / lib / libstdC ++ / libstdC ++. So.6 in my case) , and then made a link from the system (/usr/lib/i386-linux-gnu/libstdc++.so.6 OR / usr / lib / x86_64-linux-gnu / libstdc ++. so.6 OR / usr / lib32 / libstdc ++. so .6 depends on your system)

0
source

Source: https://habr.com/ru/post/1258273/


All Articles