14

Can anyone help for this? can't I run this android virtual device on Ubuntu?

2:24 PM Executing tasks: [:app:assembleDebug]

2:24 PM Emulator: libGL error: unable to load driver: i965_dri.so

2:24 PM Emulator: libGL error: driver pointer missing

2:24 PM Emulator: libGL error: failed to load driver: i965

2:24 PM Emulator: libGL error: unable to load driver: i965_dri.so

2:24 PM Emulator: libGL error: driver pointer missing

2:24 PM Emulator: libGL error: failed to load driver: i965

2:24 PM Emulator: libGL error: unable to load driver: swrast_dri.so

2:24 PM Emulator: libGL error: failed to load driver: swrast

2:24 PM Emulator: X Error of failed request:  BadValue (integer parameter out of range for operation)

2:24 PM Emulator: Major opcode of failed request:  155 (GLX)

2:24 PM Emulator: Minor opcode of failed request:  24 (X_GLXCreateNewContext)

2:24 PM Emulator: Value in failed request:  0x0

2:24 PM Emulator: Serial number of failed request:  39

2:24 PM Emulator: Current serial number in output stream:  40

2:24 PM Emulator: Process finished with exit code 1

2:24 PM Gradle build finished in 5s 92ms
Rajind Ruparathna
  • 2,215
  • 24
  • 55
Chathuranga
  • 316
  • 4
  • 12
  • Looks like the same problem as this: https://stackoverflow.com/questions/35911302/cannot-launch-emulator-on-linux-ubuntu-15-10 and this: https://stackoverflow.com/questions/42872128/android-emulator-does-not-work-on-ubuntu-16-10. Try solutions given to those questions. – Stephen C Oct 28 '17 at 10:09

1 Answers1

33

These are the exact steps you need to follow to solve the emulator issue:

1) Change directory:

$ cd ~/Android/Sdk/emulator/lib64/libstdc++

2) Create symbolic link to library:

$ mv libstdc++.so.6 libstdc++.so.6.bak

3)on the same directory:

$ ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6

That should fix it!

spiros
  • 493
  • 4
  • 11
  • 1
    This should be marked as the correct answer, most of the answers I kept seeing were point at ~/Android/Sdk/tools/lib64/libstdc++ instead of ~/Android/Sdk/emulator/lib64/libstdc++ which did not exists in my case: Android Studio 3.0.1 thank you for sharing! – wax911 Dec 20 '17 at 07:09