Android emulator keeps on crashing - android

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.

Related

Android Studio's emulator with black screen

I have a problem when I tried to start my AVD in android studio. It was working fine but all of a sudden it just turns black. I have tried to restart my pc but it didnt help. Any solution? Or is there any AVD application that I can use because android studio's AVD is kinda slow.
This also happens to me from time to time. To fix this, open your AVD Manager. Then, click the arrow to the far right. Finally, click Cold Boot Now.
I will say it will be better if you use physical mobile devices and the step to use that is mentioned below:
Pre-requesting:
Android Studio
USB cable
Android Device
Steps:
Enable USB
debugging(Link)
Automatically get device driver install on the system.
Run your app using a connected device. check ou this link
Why I am suggesting to you because this will improve your productivity of coding.
If you want multiple device testing then only go through Virtual emulator such as BlueStack, GenyMotion, AndY which I used and prefer more due to of less memory uses.
You can try Genymotion instead. It is faster than android studio's AVD and easy to use. Also in some cases, you might have riot vanguard (riot games anti cheat system), and you need to uninstall it to use android studio's AVD.

genymotion freezes entire Ubuntu Desktop

I recently downloaded the latest Genymotion version,2.7.2 (I had a previous version before, I don't remember which exactly) however whenever I try to launch an emulator, the device pops up for about a minute but before loading completely it freezes. Not only that, but when this happens the entire Desktop freezes. I'm able to move the cursor, but nothing else responds (even the clock stops working). No clicks or keys do anything and I'm forced to restart my Desktop via the power button on my machine. I'm running Ubuntu 16.04.
I've tried 3 separate times with 3 separate emulated devices and the same thing happens every time. Until I get this fixed I can't do my job, so I would really like some advice.
Had same problem,
I changed video card driver from Software & Updates -> Additional Drivers
rebooted and no freeze again
Had the same error on 16.04, fixed it by uninstalling virtualbox, then reinstalling from the deb image from the official page here https://www.virtualbox.org/wiki/Linux_Downloads
then running
sudo dpkg-reconfigure virtualbox-dkms
also switched to nvidia proprietary drivers
Some of these VMs from Genymotion are using more memory than you know. When creating a Virtual Device in Genymotion, I used the down-arrow to ensure I had enough system memory to run. Look at the attached screenshots.
I have a 6GB system and I didn't realize a Samsung Galaxy S8 was using 4GB RAM. Switching to the Google Nexus 9, which is running 2GB RAM, I was able to launch without the sluggishness.
1Genymotion seems to run with VirtualBox. Therefore, launching VirtualBox will show you the created VMs from Geny. From there, you can use the Settings in VirtualBox to change the RAM size.
I hope this helps someone because it drove me crazy.
Genymotion showing how much RAM is used

Android emulator Hardware Renderer issue

I work for the complete day on the Eclipse and run the apps on Emulator. But Unexpectedly sometimes the emulator Hangs up and continuously showing the error message. The Logcat is showing problem in HardwareRenderer.java
However, Restarting the emulator solves the Issue but it wastes time. So, is there a possible way to avoid or Recover this problem.
hello maybe it doesn't exactly fits into your problem... but instead of using emulator you can try using blue stacks its really fast and easy to run.... if you are using blue stacks as your emulator first start start the blue stacks and then start eclipse or whatever IDE you are using. In eclipse you can find the blue stacks emulator in devices tab ..Hope it will be useful for you.
http://infopulseukraine.com/eng/blog/Software-Development/Mobile/Bluestacks_Eclipse/
Use Genymotion, you will never experience any emulator issues.
http://www.genymotion.com/
Very fast emulator, requires VM installation to work.
try this...
Go to windows
Android Virtual Device Manager
Select your current Virtual Device
Edit
Disable Use Host GPU
Ok
Because if we enable Use Host GPU option, it requires high capability of your system's graphics card but mostly user does not have high quality graphics card, so it gives rendering problems. To increase the performance, enable the snapshot option.

IntelliJ Idea - Android Virtual Device doesn't start

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".

Full queue, lose event in Android Emulator

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!

Categories

Resources