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

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.

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.

"There is not enough storage space on the device to store package" when starting Android emulator

I have just updated Xamarin in Visual Studio 2015 (it was a suggested update from Visual Studio).
After the update, when I start debugging with the emulator AVD_GalaxyNexus_ToolsForApacheCordova (Android 4.4 - API 19), the following error occurs:
The "InstallPackageAssemblies" task failed unexpectedly.
System.AggregateException: One or more errors occurred. ---> Xamarin.AndroidTools.AndroidDeploymentException: InternalError ---> Mono.AndroidTools.InsufficientSpaceException: There is not enough storage space on the device to store package: /data/local/tmp/Mono.Android.Platform.ApiLevel_23.apk. Free up some space or use an SD card and try again.
This did not occur just minutes before the update, and the project remained untouched during the update. I am quite sure about that.
The Xamarin documentation has this error documented here, and says:
There is not enough storage space on the device to deploy the package
This occurs when you don't start the emulator from within Visual Studio. When starting the emulator outside of Visual Studio, you need to pass the -partition-size 512 options, e.g.
emulator -partition-size 512 -avd MonoDroid
But I did start the emulator from within Visual Studio.
Check the internal storage size and available storage of your emulator. Default configuration is often not very large.
On MAC if your getting error make sure you increase your dataPartition to 1024M
disk.dataPartition.size : 1024M
On Mac current config: Feel free to add more bytes if you have a better potato(MacBook pro) than mine
Emulator memory issue
increase heap size ( make it 2*x).
in my case before it was 256 , then after i made it 512 , now its working fine.
posted by venkat Yanamandala
Cobus answer didn't help for me. Checking the device's storage, I saw that there should be more than enough space left to deploy my app. My only solution so far is to create new device in the emulator every time this happens. It keeps happening after I deployed my app several times (like 50+ deploys).
I just clean solution and rebuild again it.
I encountered with the same issue and managed to resolve it by simply uninstall the previous versions from ADB emulator. To uninstall:
.run the emulator.
.Drag&Drop the application's icon to the trash.
These following steps work for me
Increase Data diskpartition size 1024MB
Clean and rebuild again
I solved this question by cleaning the android system cache, there are several tools in the playstore for it, im my case i was debbuging with a attached device, so there was nothing to do with the emulator settings.

Android Emulator Couldn't Launch

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.

Unable install app into emulator 2.3.3 : INSTALL_FAILED_DEXOPT

I use the latest adt-bundle-windows-x86_64-20130717, with
Android SDK Tools - 22.0.4
Android SDK Platform-tools - 18
I had tried to install app on emulator 2.3.3, both for ARM and Intel. However, it no longer work (It used to work in my same Win64 machine before I'm using latest adt)
Installation error: INSTALL_FAILED_DEXOPT
Please check logcat output for more details.
Launch canceled!
My emulator setting is as follow.
I had followed how to solve INSTALL_FAILED_DEXOPT this error?. It doesn't help for my case.
Note that, emulator with 4.1.2 work extremely well for Intel. I even try to email the APK, and download -> install from emulator. But, this is what I'm getting Application not installed
Any workaround to overcome this problem?
My logcat is having such logging
E/PackageManager(855): Package org.yccheok.jstock.gui has mismatched uid: 10031 on disk, 10033 in settings
E/dalvikvm(1241): LinearAlloc exceeded capacity (5242880), last=468
E/dalvikvm(1241): VM aborting
E/installd(798): dexopt failed on '/data/dalvik-cache/data#app#org.yccheok.jstock.gui-1.apk#classes.dex' res = 11
Note, the problem will not occur, if I were using emulator 4.1.2
Most of the time associated with excessive values for LinearAlloc. Putting verbose mode for logcat could give you more details (can even pinpoint the problem). There no definite fix I heard of.Sometimes it can be fixed by wiping AVD, some get fix by increasing SD card only, some had to recreate new AVD, some fixed it by reinstalling ADT, there are lots of fixes people speak of, answer can be varied as actual problem.
Sometimes problem can be corrupted files, or application install entries which makes android confused whether app is installed or not. Or by use of complex libraries, or even problem with the compiler itself. There's not a lot of clear information on this error from Google, they say it is related to a bug in Android OS that doesn't frees files handles in some cases. However as looking to logcat it always connected to some dex files. and so as to DDMS and compiler.I suggest you to try all of the fixes I stated, also refer the given links
Issue 22586: Dexopt fails with "LinearAlloc exceeded" for deep interface hierarchies
Cleanup redundant interfaces from iftable to avoid excessive LinearAlloc use
Issue 42538: INSTALL_FAILED_DEXOPT solved by dex.disable.merger=true
If everything failed please put your verbose logcat
Try uninstalling your app before installing it again. It seems to have solved the issue for some according to this
I was facing the same issue after upgrading ADT and I was stuck for this issue for almost half and a day.After every HIT and TRY method found the solution.
**
ONE OF LIBRARY PROJECT BUILD TARGET WAS HIGHER THEN MY PROJECT , JUST
CHANGED LIBRARY PROJECT BUILD TARGET TO 3.0 AND MY PROJECT BUILD
TARGET TO 4.0.3 AND IT VANISHES.
**
Just posted my solution if it helps others in future.
It's very hard to find out what the error is from the information you provided.
Try the following
Clean your project
Uninstall your app
Download a different version of adt bundle
Experiment with different emulators with different values
Try to use a real device, does the problem still occur?
Look through these links, maybe your problem is similar:
http://blog.elsdoerfer.name/2009/05/25/android-fix-package-uid-mismatches/
How to solve Installation failed due to invalid APK file?
LinearAlloc exceeded capacity (5242880), last=1092 Error while installing on my Samsung Tablet Device
INSTALL_FAILED_DEXOPT error when trying to install application
Good luck!

Categories

Resources