I have installed the android-studio snap package from the Snap Store in Ubuntu 18.04. Android Studio Emulator fails with the following errors:
7:17 PM Executing tasks: [:app:assembleDebug]
7:17 PM Emulator: libGL error: unable to load driver: i965_dri.so
7:17 PM Emulator: libGL error: driver pointer missing
7:17 PM Emulator: libGL error: failed to load driver: i965
7:17 PM Emulator: libGL error: unable to load driver: i965_dri.so
7:17 PM Emulator: libGL error: driver pointer missing
7:17 PM Emulator: libGL error: failed to load driver: i965
7:17 PM Emulator: libGL error: unable to load driver: swrast_dri.so
7:17 PM Emulator: libGL error: failed to load driver: swrast
7:17 PM Emulator: Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
7:17 PM Gradle build finished in 542ms
Here is how I resolved it:
Go to Libstdc++ dir in Android SDK directory
Create a back up of
libstdc++.so.6
:Create symbolic link to library:
After updating my Emulator the issue has solved. Now it's working fine for me.
The Libstdc++6 bundled in the Snap package is outdated or otherwise unsuitable for this Ubuntu release. Please file a bug report with the package maintainer and use a different Android Studio installation in the mean time,
This is fixed in Android Emulator 27.2.9. See the first fix listed here: https://developer.android.com/studio/releases/emulator#fixes