I'm using the Android emulator running API version 15 from the SDK tools and in the console I'm getting this error:
[Date - Emulator] ##KBD: Full queue, lose event
I can't click on anything obviously. I googled it and the only solution is to delete the emulator and recreate it. This works for a while but then I have the same problem again.
Does anyone know what causes this error and how to fix it?
You can try the following to clear the old data and applications (your emulator will return to its default settings and data)
Tools --> Android --> AVD Manager
Then select your Emulator
From Actions column hit the arrow and select Wipe Data
I was facing same problem, There is Nothing RAM problem.
Solution is here's
Go to Tools -> AVD Manager ->Find the emulator which you are having this error -> Right click on your emulator and click on COLD BOOT NOW.
i probably figured it out. try this:
While creating the android virtual device, you must have given its size in KIBs or upto 32 mibs as shown in one of the tutorials on web.
now delete the previous device and make a new device giving its size as 512 MIB. It solved my problem.
Hope it'll work for you also, just give it a try.
I have ran into the same problem and I realized that I had dedicated only 256 MB of RAM for the virtual device. It had simply run out of memory.
Here's the solution:
-Go to Tools -> Android -> AVD Manager
-Find the emulator you are having this error on.
-Click to the "edit" button next to it. (In 3.0, this appears as a green pencil)
-Click "Show advanced settings"
-Scroll down and assign some more RAM to the device, 1GB should cut it, 2GB is definitely enough if you are running a simple app. I would also recommend assigning 512 MB of heap.
-Hit finish. Exit the emulator and restart it.
You should be good now, I hope it's been helpful. Happy coding!
this is a bug in android emulators. i also had the same problem. use 64bit linux for development to minimize such issues.
** freezing problem is there on 64-bit linux machines also, but the frequency of such problems is highly reduced. also emulators behave notably faster.
Sorry, I don't know whether this will help you... I had many problems when I try to run the emulator in Apple Mac mini. Whenever I run the emulator, machine asked me to restart. When contact Apple support, they told me it's a problem with less Memory. Just check and see how the memory is utilized by the emulator.
This is a common issue if you not provide enough resources to your virtual device or your virtual device is stuck some how.
Any one of these solutions should work
if you don't have anything useful in your virtual device, you can wipe it. by simply going to
Tools > Android > AVD Manager
Then select your virtual device
Right click select Wipe Data
Each time you start a virtual device it maintain state and pre installed apps in its memory so a cold boot will also be a good option.
to cold boot simple follow first two steps from above and select Cold Boot Now.
Now you are good to go!
Related
Whenever I open the AVD Manager and launch any one of the virtual devices I created, the emulator starts and closes immediately. When I run the virtual device in AVD Manager for the first time I get an error message that QEMU has stopped working.
I have given the right path to the JDK. More over, I have tried to install Android Studio again and again, but still its not working. I am using Windows 7(32 bit, 2GB RAM, without graphic card).
Is there need of graphic card to run emulator? If not, what should I do the run the emulator?
In AVD manager open settings for your virtual device.
In the Emulated Performance section open the dropdown for Graphics.
Change it from Automatic to Software.
Hit the Finish button to save new setting and try starting the emulator again.
I finally found the solution here: https://www.bram.us/2017/05/12/fix-for-the-android-emulator-crashing-during-launch/
It seems to be an incompatibility with other software, such as Docker, Oracle Virtual Box and other products that use VCPU. In my case, it seems that VBox and/or DraftSight caused the issue. I don't get the error when I terminate those applications first.
After trying Vahid's answer, it stopped crashing. Unfortunately it was lagging badly. After installing the NVIDIA drivers for my card (I have a 1060), I was able to change the setting to Hardware again, and now it is much smoother.
In most cases the solution provided above by #Vahid would work but if for some reason you still want to use hardware for graphics. You can try upgrading graphics drivers and make sure to set your graphic profile aka GPU workload to Graphics instead of compute. This settings can be found in Nvidia control panel or AMD Radeon software settings, not sure if this would work for integrated graphics.
So i'm having awful trouble trying to get the Emulators in the Android SDK to start up. I can create the AVDs just fine, and then when hitting the 'start' button from the SDK Manager, bring up the small loading console window, indicating that the emulator is launching. However, after that, nothing happens!!
I have read many threads and posts with people having the same problem, maybe to do with the settings requiring too much memory, with some people waiting 30 minutes for the emulator to load!!
When trying to run the AVD emulator through terminal, I simply get a 'Bus Error' with no further indication of what could be going wrong...could it be a memory issue?
What I did to get where I am now:
Download the Android SDK package for Mac. I'm extracting the sdk only, not eclipse. I'm on Mac 10.6.8.
Install the SDK, and download the latest version of Android in the SDK Manager, along with default tools.
create a AVD and hit start.
window pops up to boot the emulator, that process is complete and window closes.
Nothing happens.
My knowledge of the sdk tools are very limited, all I want is to be able to do some testing...
Any help greatly appreciated!
Thanks
Actually, the simplest way to get emulators running right now is probably GenyMotion. They provide an interface, and pre-configured emulator images to make it pretty simple to get running.
This is not an endorsement (I use the standard ADT myself) but a lot of people find their tools useful.
Here is my suggestion: instead of using AVD, start using espresso and virtual remote android hardware emulator from Google servers - also known as android-test-kit. You will have the possibility to run and test you App on several different devices, without the need to spend money on actually all different devices for developing and testing purposes before releasing your Apps. You find further details here:
android-test-kit
Why Espresso
The 2 videos are somewhat long, but worth watching.
Taking this approach will solve your problem, save you money, and improve your productivity.
I run into the same issue on my mac 10.6 and it only works if i do
emulator64-x86 -avd my_android
Besides, my virtual device has to configured using x86 but not ARM
maybe this link can help you.
I'm using IntelliJ Idea 13 to develop Android applications on Ubuntu 12.04 64-bit. But my virtual device never starts despite there is no error.. its screen always stays like this:
My Android target level is 4.4 (API 19). How can I solve this issue?
Edit: Here is my AVD details:
I Recommend you look at this post to a similar question.
https://stackoverflow.com/a/5535532/2978914
they are using eclipse but you should be able to view the logcat, other posts say first load can be ridiculously long.
the spec of your PC may come into play as this post https://superuser.com/a/347298 explains the way the emulator converts to arm opcode: direct quote:
To use emulator more effectively, this is my experience:
Don't close emulator everytime you run your application.
Scale the emulator screen smaller.
Disable snapshot (Yes, it's useful but it takes time to close the emulator).
Specify a file path for SD card image file. I use only one SD card for many AVDs.
If you got any problems in adb, just reset adb, don't close emulator.
Open few programs in your operating sytem.
If you are using Windows, don't ever close emulator. Do it combined with Hibernate of Windows.
My AVD has started after I check "Use Host GPU" option from "Emulation Options".
How do I increase the speed of the virtual device emulator in the Eclipse SDK for Android app development?
I have been searching all over the internet to find out how to speed this thing up, but I can't seem to find a fix that actually works for me.
Another problem I'm having is that I can't get the RAM above 1024MB.
Thanks for all the help. I have now fixed the speed. For anyone with the same problem, make sure this box is checked.
However, I still can't get my RAM above 1024 MB. What's the fix for that?
Method I've found which has worked on both my laptop and desktop that I use for development is when you create or edit the Android Emulator (AVD) there is an option near the bottom that says use Host GPU.
I've have found this to work on all Android versions
UPDATE
I missed the bit about the RAM problem. You haven't said if there is an error regarding the memory issue, but if you seeing failed to allocate memory: 8 then you need to modify the AVD config.
Go to C:\Users\your_name.android\avd\avd_name\config.ini and find hw.ramSize and make sure that MB is on the end of the number.
If you use an Android virtual device with Intel system image, you can enable HAXM(Hardware Accelerated Execution Manager) to speed up code execution. Take a look at this article: http://developer.android.com/tools/devices/emulator.html#acceleration
I would suggest to lower the resolution of the emulator to 320x480 and remove the skin of it (and learn the hotkeys).
If the hardware acceleration can work with your machine, try it. I've enabled it but never noticed any difference.
If that doesn't fit your needs, you can use other alternatives, which are faster, but have less features and I haven't tested them much:
VirtualBox together with androidx86 - only one I've tested and debugged an app on, but it was a long time ago.
Bluestacks - had lots of bugs, but seems promising.
WindowsAndroid - new, works, but I can't find out how to connect via adb.
Same as #1, but with androidvm instead of androidx86.
Genymotion - alternative emulator.
Try using Genymotion. I think that it would be a good choice. https://cloud.genymotion.com/page/customer/login/?next=/page/launchpad/download/
You can change it to least :
also :
and change the Screen coordinates from here :
note : in first step choose the Edit ,and the second step choose the start
Complete speed up android emulator sollution step by step cań be found also for beginners here:
Speeds Up the Slow Android Emulator
This sollution worked on my i3 machine very well. I have tested many sollutions and emulators for days, but this one is fastest and best for me.
Follow the following steps to make android emulation almost as fast as a real device.
Start the AVD Manager and create a new AVD with the Target value of Android 4.0.3 (API Level 15), revision 3 or higher (And choose the other settings like usual).
In Eclipse, click your Android project folder and then select Run > Run Configurations...
In the left panel of the Run Configurations dialog, select your Android project run configuration or create a new configuration.
Click the Target tab.
Select the AVD you created in the previous procedure.
In the Additional Emulator Command Line Options field, enter:
-gpu on
Run your Android project using this run configuration.
I have tried this and i confirm the result is a noticeably fast emulator (sometimes faster than a real device).
Ref - http://developer.android.com/tools/devices/emulator.html#acceleration
I have big size application when i run in emulator I got this exception
com.android.ddmlib.SyncException: No space left on device
can anybody tell how to solve this problem?
Open AVD Manager
Tools -> AVD Manager
Click On Edit Option Of Your Emulator From Actions Column On Right Side Of AVD Manager.
Its Open Virtual Device Configuration Window, Now Find "Show Advanced Setting" Button And It Will Show "Memory And Storage" Row Over There "Internal Storage" Have Some MB, So You Need To Increase It Like 2000,3000... And More
Than Finish It And Run Your Emulator Again Its Working Fine.
Create the new emulator and give the more size or unistall all the applications in the old emulator.
Essentially, that means you have a memory problem. More than likely it is a leak.
First restart your phone and verify you are still getting the error. If so you are going to need to start digging in your code and find out where you are leaking!
Need more help? Post some code!
Switch DEBUG USB off and on again. It works for me. It seems to be some sort of problem with USB sync when debuggin in my device.
Hope it helps!
Install a new emulator then go to the advanced settings, find storage and memory and increase memory there.