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.
Related
As i work in Android Studio 3.1.4, I have noticed that the Android emulator is blazing fast when I first open it. As I continue to use it, typically by clicking on the "apply changes" icon, it slows down over time until it is eventually no longer usable. If I then close the emulator and open it up again it reverts to being blazing fast.
This happens on multiple computers, all using Windows 10. One of the PCs even has an SSD hard disk. It happens in multiple apps, whether I have only one app open or multiple apps open.
Any thoughts about an easy fix for this? Thank you in advance.
I don't know why is doing that.I've heard about Genymotion emulator if you want to try(i haven't tried it yet though).You can give a try :)
Genymotion
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.
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".
The emulator comes up but its very unstable. It keeps giving me the window that asks to send data to microsoft. The it becomes not responding and freezes up. Sometimes I might keep it up for a while and am not doing anything to it and all of a sudden it pops up the debug window.
Is there something I can do to make it more stable.
This is specific to your system and the software installed on it. The emulator is rock solid (mostly), so try and solve the problem on your system.
I had such problems when trying to create an emulator with higher resolutions.
Creating a simpler device solved my problem. Probably it was due to my PC specs (P4 2.4 Ghz, 1 GB of RAM).
I have found emulator instances and the AVD manager itself to be VERY flakey.
This is despite re-installs, constant SDK updates and across multiple machines.
Often the only resolution I've found is to delete the AVD that is crashing and recreate it from scratch.
Also make sure you are using the snapshot facility so that you are at least loading fast when it does crash.
I read on many other topics that the Android emulator starts really slow. Indeed, it takes +15 mins to start. However, on my machine is slow even after that.
The 'phone' responds with a 3-4 seconds delay and everything has a huge lag.
Is there any way to improve the performance of my laptop (Asus 1201N) is too rusty for the Android emulator?
PS: Tried in different emulator resolutions and the result is the same
Edit: My laptop has 2 cores with HyperThreading. And it shows as 4 CPU in Device Manager. However, when using the emulator, just one of the graphs is at 100%. Can I do something to make it work multi core?
Do you have "Disable Boot Animation" checked?
Also, if that doesn't fix it, one thing that helps is that you never actually have to close the emulator screen while you're coding. If you click debug when it's already open, your APK will get uploaded to the emulator and start pretty much immediately. For some reason it took me a while to figure out that I didn't have to manually close the emulator.
One thing I learned that helped me is that once the emulator is open from your first debug run you DO NOT have to close it. Leave it open, and on your next debug run it will be ready to go without any load up time like when you first open it.
In regards to your slowness after startup I suspect it's just your computer. It runs very fast for me. It starts up in about 20 seconds or less, and once it's open my subsequent debugs load very fast.
I hope at least my first tip helps to save some of your sanity.
Here's what you can try. It does speed up the emulator for me, especially during loading time.
I noticed the emulator is only using a single core of the available CPU. What I did is to set it to use all available processors.
I'm using Windows 7.
When the android emulator is starting, open up the Task Manager, look under the Process tab, look for "emulator-arm.exe" or "emulator-arm.exe *32" ...right click on it, select Processor Affinity and assign as much processor as you like to the emulator.
I think there is few ways to improve the performance of your Android Emulator like
Use Snapshot, this will improve the boot time for consecutive application running
Use x86 Intel Hardware Accelerator
Use 3rd Party Emulator like BlueStacks
Hopefully it will help you to improve the performance and resolve your problems.
Thanks
I had the same problem and in order to solve it I just disabled all the transition animation effects that are enabled under Spare Parts.
it is way too slow for me too.
(slow on both my Pentium 4 (ubuntu) and my dual core 64 laptop (Windows 7)
apparently it uses QEMU - could I perhaps look for the image file and try a different version of qemu?
Another thing I tried is this: http://www.android-x86.org/ (in vmware)
this seems MUCH faster but I can't get it to see the network!
(right now I just want to test some websites in the brower so seeing the network is a must - I'm not doing native apps just yet)
I discovered that instead of running the 'Debug' target, I just run the 'Run' target. The emulator runs a lot smoother when doing so. I only jump into debug mode if I really need it.
To connect to network from android-x86, you neek to manual setup ip manual by use this command in console mode (Alt + F1):
ifconfig eth0 netmask 255.255.255.0 up
after do that, you can check it by type : netcfg in console and you can see this ip is set at your local wmware
you can check it success by ping ip you had been set in command prompt, and after that, you can use adb connect to connect debugger to your virtual android