Searched for a solution, didn't find anything helpful.
I have a GTX 970 and an i5 4690k OC 4.2 GHz.
The Emulator from Android Studio is lagging as hell and I don't know why.
Intel HAXM is installed, 4G Ram is allocated to the Android Device. I just can't find a solution. Btw. I don't think my processor is too bad since I can run 2 VMs at once and the Emulator works fine on my XPS 15 9560 (i7 7700HQ & GTX 1050)
Does anyone have an idea what to do?
Config:
Also tried using Software for graphics emulation, much more slower. Btw for reference this runs in the background and doesn't seem to resolve:
The SDK used
CPU Usage:
Also, I installed the AVD also on the same system on Hackintosh:
CPU: 10% and works smoothly
Cut the RAM way back. There is no Android device of note that has 8GB of RAM. Something in the 1-2GB range should be fine.
Cut the VM heap way back. For example, my emulator images use 48-128MB, not 8GB.
If those don't help, experiment with a lower-resolution emulator (e.g., Nexus 4 1280x768) and see if that changes your results.
Fixed it! I did a random windows update to Version 1803 and now the emulator works perfectly! Thanks for all your suggestions and answers!
also think that the RAM settings are at fault ...
in particular the heap size matching the total capacity.
the default settings, which should run smooth(er) are:
CPU: 4 Cores (while available)
RAM: 1536MB
Heap: 384MB
also check background processes once, in particular AntiVirus with on-access scanner, etc. (some people have 2-3 of them installed); one of them is enough and if present, disable it once for a test. the emulator ordinary is much less of a memory hog than Android Studio with Gradle can be. if everything fails, the screenshot shows that there is one bank available, which could take 2 DIMM. booting another system from external media might also worth a try, in order to rule out the current OS install. and I also have that "preparing for setup" on one emulator image; that's nothing to worry about.
Could you try changing the OpenGL ES Renderer to Desktop Native OpenGL
And OpenGL ES API Level to Renderer Maximum
This made my emulator very responsive, almost 2x faster.
Like this picture
Also it might be worth mentioning that I set both my camera's to none.
Related
I have tried looking at this SO post but I already have 16GB of RAM and I don't want to decrease AVD memory. I do not understand why the Android Emulator takes up so many resources (%25+ CPU, Almost 1GB of RAM) when running a simple app (Like this: Single Activity with a RecyclerView and its Adapter. That's it). Any help would be appreciated.
My fan is always on when using the Android Emulator in Android Studio.
This is normal for the Android Emulator. My numbers are the same.
This is a big pain for me and even bigger after upgrading the AndroidStudio version.
One alternative is to use an external Device for Debugging in place of an Emulator.
I know that question was already asked. But I'm adding some more details and asking more precise questions that can solve this problem.
Actually, when I start an AVD with 312 MB of RA it does manage to do it respectably (even if it's considered slow).
But when I ask for 512 MB of RAM, it's like it will never start at all (in fact never), and noticed that the AVD only works on a single core a 100%. Plus it populates the RAM quite quickly until it reaches around 175MB (5-10MB/s) and then slows down dramatically (250KB/s).
How can this happen and how can I do for preventing such RAM filling performance drops ? Or even set the AVD to use more than one single core ?
I run this on a Core I5, with 4GB of RAM.
Edit: Why so much downvotes ?
Problem solved: Templating from a Nexus 5 messed up everything, went to Nexus 4 and everything works like a charm.
a. Use the Intel system images available on the SDK manager.
b. Use this software by Intel to make your emulator run faster.
c. Use Genymotion.
The problem started when I changed the skin built-in display setting to WXGA720.
Then everytime I'm trying to run the emulator it says the following message:
Starting emulator for AVD 'android403'
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 already tried to lower down the RAM size to 800 MB and then 512 MB (or even 256) but it didn't work either...
I don't know what to do...
Here's a screenshot of the emulator settings window:
Thanx upfront.
I do sometimes have the same problem. Maybe my solution works for you as well: Instead of choosing the WXGA720 skin preset, manually set the resolution to 720*1280, and manually set the RAM to 768 or even 512.
Seems stupid, but it makes a difference if the skin preset is uses or a manual resolution configuration.
I had the same problem. I have set the resolution manually to 720 X 1280. Set the RAM size as 128MB and SSD to 16 MB. The app came up without any problems after that
This may sound silly, but I resolved the issue by adding "MB" after the RAM setting, changing (for example) 1024 to 1024MB.
I figured it out. The problem was in the amount of ram I had specified for the virtual machine, and it was 1024MB, now I have 512MB and it is ok. enjoy ;)
I also faced the same problem for x86 emulator for android 4.0.3. This problems happens to me only when i try to launch emulator from eclipse. But works fine when i launched the emulator from command line. Try to launch the emulator from command line.
Go to android tool directory and use "emulator -avd " to launch your emulator.
I had the same problem, trying to emulate the Galaxy S3. Setting the resolution to 720 x 1280 and dropping ram from 1024 to 700 worked for me. Could't get it to work at all on the built in wxga720 settings.
I was with the same problem today, but I manage how to solve it ( at least for me, because I was doing it in the wrong way), hope that it can be usefull for you too.
I was trying to change de Device RAM memory direct by Eclipse via Android Virtual Device Manager. I don't know why, but this changes does not affect the "hardware.ini" file that is present in : \android-sdk\platforms\android-16\skins\WXGA800-7in , for example.
To change the device RAM, or just to add MB you need to change this file.
I'm trying to start AVD with Android 4.0 on WXGA mode (720 or 800) [for Tablets] but its very slow
First it was crashing when i started the device
Then i un-installed the AVD and SDK and reinstalled it and now it takes a lot of time to start and very slow on response
It's working fine for Android 2.x and 3.x but not for 4.0
I tried increasing RAM size also but it didn't worked (with snap shot or without snapshot)
The issue is screen size. Tablet-sized emulators for Android 3.x or 4.x presently use a LOT of CPU power.
Some of that is the home screen itself, so replacing the home screen with a simpler implementation can help. I use Zeam Launcher for this, in part because you can legally get the APK outside of the Android Market.
Beyond that, you need a development machine with a powerful CPU. I switched from a dual-core 2.5GHz machine to a Core i7 2.7GHz machine for that reason. The reason wasn't the 2.5 -> 2.7 jump, but the fact that the Core i7 supports Turbo Boost. The Android emulator only uses a single CPU core; TurboBoost effectively combines multiple cores to create a faster "Supercore" (cape optional). My Core i7 will TurboBoost to 3.4GHz, and 2.5 -> 3.4GHz, coupled with the simpler home screen and setting Device RAM to 1024 in the AVD, has gotten the emulator to the point where I can deliver training with it.
Well? I've tried increasing the RAM size of the emulator to 1024 MB and there was little improvement on the speed, however, it's still unusable. It has the speed of a turtle.
Anyone got better ideas to make it faster? Is there something I'm not doing correctly?
Check out the android developer documentation regarding 3.0 emulator performance. Scroll down to About Emulator Performance.
Copied tip for convenience:
Tip: To improve the startup time for the emulator, enable snapshots for the AVD when you create it with the SDK and AVD Manager (there's a checkbox in the AVD creator to Enable snapshots). Then, start the AVD from the AVD manager and check Launch from snapshot and Save to snapshot. This way, when you close the emulator, a snapshot of the AVD state is saved and used to quickly relaunch the AVD next time. However, when you choose to save a snapshot, the emulator will be slow to close, so you might want to disable Save to snapshot after you've acquired an initial snapshot (after you close the AVD for the first time).
Seems like everything 3.0 and beyond is slow for me. Everything before that runs very fast in emulator for me. However, I have an Intel integrated graphics card in my laptop. When I turn 3D setting to "Application Settings," I get relatively decent performance from the emulator, at least when it starts up, but then when I try to start any app from the default main app menu (contacts, for example) I get launcher errors. That happens for me on 3.0, 3.1 and 3.2. The one thing I'm suspicious of is that I'm running 64-bit Java SDK. Seem to be a number of posts out there related to 64-bit, but mostly they seem to be point to using 64-bit SDK with 32-bit Eclipse or vice versa, but in my tests, I am not even running Eclipse, haven't even reinstalled the ADT yet, just the Android SDK and created a few emulator instances. Again, prior to 3.0 everything is fast. 3.0 and beyond not good, but A LOT better with graphics settings as I mentioned above. If I could get past the launcher issues, I think I might be all set. Oh, btw also, for 3.0 and beyond, I bumped the memory up to 1024. I've tried increasing the heap for apps to double the default (from 48 to 96) but that doesn't seem to have alleviated my launcher problems.
It is slow. You can try creating a new Emulator with a smaller resolution.
I remember someone at google I/O saying that the HoneyComb emulator will run really really slow due to hardware acceleration turned on.
The PC may use software rendering for OpenGL hence the bad performance. The almost everything you see on the HoneyComb screen is rendered using OpenGL ES.
감사합니다,
Reno