Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse Android Emulator won't launch

I have installed Eclipse 4.2 with Eclipse android plugin(ADT)on ubuntu 11.10. when i launch "Hello World" project as an android application, it simply wont launch!

ps -x > log.txt after launching the emulator, output:

1000      7221 20.0  0.6  16884  6908 ?        D    18:11   0:00 /home/tutakhail/android-sdks/tools/emulator-arm -avd AndroidBrowser -netspeed full -netdelay none

launching the emulator manually from shell, i get the following error, shortly after which the emulator launches but is very slow.

emulator: ERROR: Could not load OpenGLES emulation library: libOpenglRender.so:    cannot open shared object file: No such file or directory
emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.

Any hints on what could be the issue here? Perhaps related to Ubuntu?

like image 686
tutak Avatar asked Jul 26 '12 16:07

tutak


People also ask

Why is my Android Emulator not working?

If the Android Emulator does not start properly, this problem is often caused by problems with HAXM. HAXM issues are often the result of conflicts with other virtualization technologies, incorrect settings, or an out-of-date HAXM driver. Try reinstalling the HAXM driver, using the steps detailed in Installing HAXM.

Why emulator is not opening?

If the emulator fails to launch due to the error vulkan-1. dll cannot be found , you probably need to update the emulator. To update the emulator in Android Studio, go to Tools > SDK Manager and install the latest stable version of Android platform.


2 Answers

Turns out the solution is to point LD_LIBRARY_PATH to the /tools/lib path. Below works for me.

➜ tools file ../tools/lib/libOpenglRender.so ../tools/lib/libOpenglRender.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, not stripped

➜ tools export LD_LIBRARY_PATH=/home/xxxx/devel/android-sdk-linux/tools/lib:$LD_LIBRARY_PATH

➜ tools ./emulator-x86 -avd AtomX86 -gpu on -qemu -m 1024 -enable-kvm

emulator: emulator window was out of view and was recentered ....

like image 109
parry Avatar answered Sep 19 '22 15:09

parry


I guess its a bug affecting the latest versions of the ADTs perhaps has something to do with NVIDIA GPUs drivers. The issue is discussed here:

https://groups.google.com/forum/?fromgroups#!topic/adt-dev/nlA07toW1fc

The work around that I have found which at least lets me execute my applications till a permanent solution is released, is that by first launching the emulator from shell even if it throws the error. After which i right-click and run my projects as an "Android application". The emulator does surprisingly execute them!

like image 21
tutak Avatar answered Sep 19 '22 15:09

tutak