Android Emulator Couldn't Launch - android

I've managed to run android emulator through eclipse usually. But i don't know why the emulator couldn't launch for now. When i run it, i got message
"Couldn't launch the emulator! Make sure the SDK directory is properly
setup and the emulator is not missing."
I can't figure out why this error happens since i never do anything with my sdk except that i ever move it to another directory and bring it back again.
I've found another question in SO similar to this but with a little difference in error message. And all of those answers don't solve my problem. I've tried launch the emulator from command line directly until i got this error message after the emulator shown and exit immediately.
kahfi#kahfi-yanmii:~/sdk/tools$ ./emulator-arm -avd ginger-galaxy-mini
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.
[xcb] Unknown sequence number while
processing queue
[xcb] Most likely this is a multi-threaded client and
XInitThreads has not been called
[xcb] Aborting, sorry about that.
emulator-arm: ../../src/xcb_io.c:274: poll_for_event: Assertion
`!xcb_xlib_threads_sequence_lost' failed.
Aborted (core dumped)

From the error message saying,
"Could not load OpenGLES emulation library: libOpenglRender.so: cannot
open shared object file: No such file or directory"
It seems that file libOpenglRender.so not found. In this thread Emulator not running, please look at user827992's answer that is probably related to your problem. Make sure the file exists and is readable and then write the directory path of the libraries into /etc/ld.so.conf.d/androidGL.conf.
I hope this would solve your problem.

You should install Genymotion. http://www.genymotion.com/
It is a system for managing and running Android emulators that are much faster than the ARM emulators you usually use, and it is simpler to use as well.

Related

Unable to launch emulator on Android Studio: EventQueue.isDispatchThread()=false, then unable to locate adb

When trying to run my device emulator on Android Studio, a pop-up appears:
Previously, I had gotten the error 'Unable to locate adb', but after replacing the default platform_tools folder with the
official version, this pop-up now replaced the last one. I don't think this is a problem with my installation, as I've uninstalled and reinstalled Android Studio and the flutter-sdk several times, each attempt met with the unable to locate adb error, then this one. Could it be the way I'm unzipping a certain file? I'm grasping at straws here.
Are there any fixes for this? To be honest, I'm not even sure where to start. I haven't seen any other page that describes getting this error while trying to launch an emulator.
Thank you for your time!
Edit: Error description in plain-text:
EventQueue.isDispatchThread()=false Toolkit.getEventQueue()=com.intellij.ide.IdeEventQueue#2c5cc720
Current thread: Thread[ApplicationImpl pooled thread 4,4,Idea Thread Group] 1175604479
SystemEventQueueThread: Thread[AWT-EventQueue-0,6,Idea Thread Group] 1657237134
I've tried to create a new device and wipe the data on my current one, but that just results in the unable to locate adb pop-up again (I don't have an antivirus like Avaast enabled by the way), and I am absolutely certain that adb.exe is in my file-path (C:\Users\User\AppData\Local\Android\Sdk\platform-tools\adb.exe). I have uninstalled and reinstalled platform-tools from the SDK-manager multiple times, each instance being met with this same error. I cannot run any flutter program, on any emulator. I have not yet tried with a regular Android Studio project. Any ideas?
so, i'm still not sure why the EventQueue error is showing, but what I do know is that the unable to locate adb is a negligible pop-up if you know for certain that adb.exe is in your file-directory. My issue was that I didn't have enough memory to run the emulator on my machine, so be sure to have plenty of room while developing apps (~11 gigs while using Android Studio and flutter-sdk)! That's all, it certainly was a strange experience working through it.
In my case, what helped, was to just restart an emulator.

Android Emulator Error - Failed to open ..../joshuaduong/..../qemu.conf, err: 2

When I executed the following command.
emulator -avd Nexus_S_API_28_86 -wipe-data -no-boot-anim
I got the following error message.
Failed to open /usr/local/google/home/joshuaduong/emu/master/prebuilts/android-emulator-build/qemu-android-deps/windows_msvc-x86_64/qemu.conf, err: 2
The emulator starts and works fine. However, I am not comfortable receiving an error message. Moreover, I have no idea who "joshuaduong" is. I searched for this path in Android Studio files. Interestingly (or scary) enough, I found it in the following dll file:
C:\Users\<MyUserName>\AppData\Local\Android\Sdk\emulator\lib64\glib-2-vs11.dll
and in 8 exe files:
C:\Users\<MyUserName>\AppData\Local\Android\Sdk\emulator\qemu\windows-x86_64\qemu-system<something>.exe
Why would "joshuaduong" be in dll and exe files! Have these files been compromised? Avast Free Antivirus could not find anything wrong with them. What package/library should I re-install to get a fresh copy of these files. The ones I got have a timestamp of 12/12/2019. I think I downloaded some updates on that date.
Certainly no expert, but it looks like the Google engineer left the references of their library dependencies and bundled it all up by accident.
I certainly don't believe it's malicious. I'm running the Stable channel and I see it too when I run the emulator through console. I can't get my hands on the Canary channel right now, but it's possible this might've been fixed there since they updated the emulator yesterday.

VM Ubuntu: Android Emulator won't start from Eclipse

I have created a VM Ubuntu 14.04 using Vmware Player, and I've installed the ADT environment for Android Development.
I have created a new Android emulator using the shortcuts present in Eclipse; when I tried to start emulator I got the following known error:
Starting emulator for AVD 'AVD_for_Nexus_5_by_Google'
ERROR: 32-bit Linux Android emulator binaries are DEPRECATED, to use them
you will have to do at least one of the following:
- Use the '-force-32bit' option when invoking 'emulator'.
- Set ANDROID_EMULATOR_FORCE_32BIT to 'true' in your environment.
Either one will allow you to use the 32-bit binaries, but please be
aware that these will disappear in a future Android SDK release.
Consider moving to a 64-bit Linux system before that happens.
I fixed it in both ways: putting a variable in my .bashrc:
export ANDROID_EMULATOR_FORCE_32BIT=true
and also setting the emulator option in the Eclipse preference dialog:
Nevertheless, every time I try to start the emulator I got always the same error.
The wierd thing is that if I try to start the emulator from a bash window, it starts normally.
This could have been a boring workaround, but I would have been happy anyway. The problem is that when I try to deploy an application from Eclipse, the emulator started in this way is shown as "Offline" and I cannot run any application on it. Possibly I can upload the apk into the emulator from the command line, but debugging the app would become a bit harder.
Has anyone got the same problem or does know how to fix it?
I found out a partial solution for connecting eclipse to the running emulator started by command line: the emulator MUST be started with no snapshots.
Indeed, if I start the emulator without snaspshots, it become "online" in DDMS, and I can finally use it.
Although this could be a bit annoying, because starting the emulator from scratch every time it takes a long time, at least I have a way to use it.
On the other hand, I don't know exactly the reason of this behavior, if someone has an answer it will be appreciated.
Moreover, I still do not have idea why I'm not able to start the emulator from Eclipse.

Issue setting up Android SDK - Failed to Start Emulator

I'm new to Android Development and I am attempting, and apparently failing, to set up the Android SDK with Eclipse. I thought I had everything working, but when I go to start the emulator I had set up I get the error message:
Starting emulator for AVD 'MyDevice'
Failed to start emulator: Cannot run program "/home/danny/android-sdk-linux//tools/emulator": error=2, No such file or directory
Note: I tried chmod-ing the directory containing the SDK as a search told me that would help, but it didn't work.
I'm on Ubuntu 13.10 and I'm using Eclipse. I also had another problem with the creation of a new project, but I'll wait and ask that in a new post in case the solution to this problem doesn't also solve that.
its your path as you have //in it..
directions on how to modify profile is at here:
install on Ubuntu

"createRenderThread failed to connect" when starting an Android Virtual Device

Can anyone tell me how to resolve the following issue, or what tools may be available for me to try to resolve this. I get this error when I try to start a Jelly Bean VM.
Starting emulator for AVD 'Nexus_7'
createRenderThread failed to connect
Failed to allocate memory: 8
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
I've tried executing it from the command line as:
C:\Program Files (x86)\Android\android-sdk\tools>emulator -avd Nexus_7 -memory 1024
And still no-go. I can't see any way to get more detailed information. And I really don't know where the 8 comes from from memory allocation.
Here's my virtual device set-up:
Any help is appreciated.
In my case this was caused by blocking some of the traffic/ports in my firewall.
It appears that this message is shown also when the emulator can not be reached (e.g. by Eclipse). When this is the case, the following happens:
the message (create render thread failed to connect) appears also while starting the emulator from AVD
Eclipse does not 'see' running emulators and starts a new one for each run of the program
Eclipse never manages to load apk into the emulator
I believe this post can help you to solve this issue. Just download tools_r19-windows.zip zip file and replace the tools folder in your sdk with the one provided in the zip file. Later when you launch Eclipse, ignore the ADT version warning message and you are good to go.
I also had the same issue and this technique helped me to solve the problem.

Categories

Resources