Android Studio rants unable to load driver and AVD doesn’t start
Android Studio environment has a lot of built-in parts and one of the most useful is Android Virtual Device Emulator. It helps you to test your applications in a easy way and without using a real device. Latest revision of Android Studio has also a very performant emulator system.
While using it on Fedora is a very charming experience, on the new Ubuntu 16.10 some issues arrived on board.
Nothing painful, but if you get:
Cannot launch AVD in emulator. Output: libGL error: unable to load driver: i965_dri.so libGL error: driver pointer missing
or something similar, you’re unable to work with the Android Emulator Device.
It’s a libGL error and libstdc++ issue. Cannot launch AVD in emulator
It’s a know bug and you can easily beat it with some simple steps.
I have tested this solution on a Ubuntu 16.10 64bit
First, install some packages and libs:
$ sudo apt-get install lib64stdc++6:i386 $ sudo apt-get install mesa-utils
Second, tweak some links:
$ cd YOURPATH/Android/Sdk/tools/lib64 $ mv libstdc++/ libstdc++.bak $ ln -s /usr/lib64/libstdc++.so.6 libstdc++
Third, relaunch your AVD device and test it.
Alternative solution, available only by terminal is to launch emulator with:
$ emulator -use-system-libs -avd YOUR_VIRTUAL_DEVICE_NAME
That’s all. Enjoy it!