Planning on getting an 8gb ram laptop, at least 256gb ssd, with core i5(at least 8th gen) with financial management, I have seen post of some people saying 8gb ram is not enough to run intelliJ IDEA, some even say 16gb is just manageable and as I only intend to run just the ide before moving to android studio for building apps though I intend to get an android device for emulation alongside the android studio so I dont in any case use the virtual device, what do you guys suggest about getting the 8gb ram laptop, do you guys think the ssd can speed up my compilation without lagging or I should try to get a higher ram. Besides, I have a Lenovo thinkpad X140e mini laptop with 3gb ram, amd A4 series chip, 256gb HDD, and the laptop is so slow as it takes about 2 minutes to compile a simple println statement and after compiling about 5 codes, it might just freeze for more than 6 minutes, need help from experienced users and the time it takes to compile a code in the ide (those with the 8gb ram laptop and ssd)
my laptop is i7 4510U , 4GB ram , Intel HD graphics 2gb , Nvidia GeForce 840m 4GB
why it's so laggy when Iam using android studio?
Your 4GB of ram is to blame,
to use well Android Studio, you need at least 8GB of RAM (more if intend to use emulators), just note that the GPU have no use here, and even the processor you just need a mid range processor to work well, but when compiling the more powerful processor you have the better.
I also had problems but then i disabled some plugins and tried to build gradle offline, you can find detailed answer here :
http://stackoverflow.com/questions/30817871/android-studio-is-slow-how-to-speed-up
After restarting my computer the Android emulator is very slow on visual studio 2015, but after a few hours of running it's back at normal speed.
While the emulator is slow I constantly get messages like process system isn't responding, settings isn't responding, launcher3 isn't responding.
Emulator specs:
Android 6.0 - API Level 23
CPU : Intel Atom(x86)
RAM: 1835 VM Heap: 128
Internal Storage: 800
SD Card: 100
Use Host GPU enabled
Anyone know the cause of this happening?
Finally fixed it.
In my case, I have a laptop with an extra graphic's card.
After changing settings in the nvidia panel: Control 3D settings -> Prefer nvidia processor.
then
right click AVD Manager.exe -> execute with graphic processor.
That fixed it for me
The emulator qemu-system-i386.exe cpu usage almost constantly running between 7~9
Android studio 2.1
Android SDK Tools: 25.1.3
Host Operating System: Windows 7 - i7 2630QM - 8GB Ram
Intel x86 Atom System Image installed
No matter what setting i change in the emulator like: emulated performance, multi-core CPU, x86-64 image, always the same thing
It is really annoying fan always on
Anyone had a fix for this issue?
The cause of the constant CPU usage could be the sound. If you do not need sound in your emulator you can disable it by editing the AVD's config file.
Change/add those two lines
hw.audioInput=no
hw.audioOutput=no
Update: As buncis commented you can also try to disable GPS if not needed:
hw.GPS = no
On Linux/Mac the file is located at ~/.android/avd/<AVD_Name>.avd/config.ini
On Windows the file is located at C:\Users\<username>\.android\avd\<AVD_Name>.avd\config.ini
On Mac I noticed that the emulator was using over 100% CPU after my laptop went to sleep. Turning the audio off as Benjamin suggested didn't fix that problem.
Restarting the simulated device by long-pressing the power button on the emulator works for me.
Using the x86_64 (Or the 64 bit) emulator solved it for me. They recommend the x86 version, but it was acting up for me.
To find out what on the virtual device is using the most CPU:
adb shell
$ top
This will show you a list of processes with the highest CPU usage atop.
This will help you determine whether it's a process (such as your app) inside the emulator, another process inside the emulator, or just the emulation itself using a lot of CPU.
In the latter case, try optimizing the emulator by installing HAX (Native intel instructions) or perhaps enable hardware acceleration using the AVD profile editor.
I had that problem on the start of November 2018.
Virtual device was contently trying to connect to the mobile network data, so I turned it off inside of the device itself.
Work great now.
The same problem with qemu on Win7, HAXM 7.2.0. I've tried switch off audio, it didn't help, qemu consumes about 20% of CPU anytime, Android works very slow on both x86 and x64 images.
I've found solutions in HAXM's Release Notes file:
On Windows, Avast Antivirus may interfere with HAXM and cause Android Emulator or QEMU to run very slowly. A workaround is to uncheck "Use nested virtualization where available" in Avast Settings > Troubleshooting.
I have Avast Pro Antivirus 18.5. I've unchecked this param, rebooted PC and now qemu consumes 0% in idle, Android works fine.
UPDATE: if QEMU started consume CPU again, first check Avast's update status. After background update Avast may start to interfere to HAXM again. Just reboot Windows to solve it.
In my case using hardware graphic solved my problem.
my case, coz I choose software for graphics rendering in adv. so after a change to the hardware reduce CPU usage from 60 to 10, and CPU temp from 70 to 40.
I am on macOS Catalina(Version 10.15.2) with Intel Core i9 and 16 GB RAM and Radeon Pro 560X 4GB Graphics.
I solved high CPU usage by qemu by restarting the emulated device using the emulated power button.
Also, while creating the AVD, I chose Hardware Graphics Renderer instead of Auto.
Using kind of old Android version I used Lollipop Galaxy Nexus API 22 dropped CPU usage from 220% to around 30% ! ...
I also switched: Emulated Performance > Graphics > Hardware
Using Android Api 25 ... Hardware for graphics and turning off AVD audio and GPS didn't work for me...
Platform: MacOS
I reduced the CPU usage of my emulator by setting the framerate of the monitor to 60hz. It was on 144hz and my CPU was running at 60% - 70%. By only changing the framerate of the monitor, it's now sitting at 3% usage.
I wasn't able to shut the audio off with the config.ini file, but only with the -noaudio cmd line argument to qemu. However, with Android Studio 3.2, you can't add custom arguments to the emulator, so I made this:
In the emulator dir of the Android SDK, in my case ~/Android/Sdk/emulator/
mv emulator emulator.orig
Make a bash script called emulator with the content:
#!/bin/bash
DIR=`dirname "$0"`
$DIR/emulator.orig -noaudio $*
Then:
chmod +x emulator
Now, the argument -noaudio will be added to all invocations of emulator from Android Studio and will save you a lot of CPU cycles.
I solved it by cancelling "Auto-save current state to Quickboot"
Snapshots -> Settings -> Auto-save current state to Quickboot - NO
I had the same issue recently on Windows 10 (18363): the AVD used all of the host's 16 Threads at 100%, it seems the android.hardware.graphics.composer#2.1-service process on the AVD was to blame.
What helped in my case: going to AVD settings - Advanced - change the OpenGL ES renderer to Desktop native OpenGL and restart the AVD. Now it uses like 2-3% of my CPU resources. Hope this helps someone.
Update:
I have installed Genymotion plugin at genymotion.com/plugins, and it has an amazing performance
In my case, I only encountered this issue when running multiple instances of the emulator.
Re-run the Intel Hardware Accelerated Execution Manager (HAXM) installer provided in the Android SDK (<Android SDK path>\extras\intel\Hardware_Accelerated_Execution_Manager\intelhaxm-android.exe), select Change, and see how much memory is allocated to HAXM. If it's 2 GB or less, you probably want to raise it to at least 4 GB. Then restart your emulator and see if the CPU usage drops.
Disable location in settings and also disable touch sounds.
In my case it was the fast boot that was causing the problem, to force into normal boot open the text file in C:\Users\<username>\.android\avd\<AVD name>\config.ini and change at least one of the values.
for example change the line
hw.battery=yes
to
hw.battery=no
In my case it was Airplane mode, when turned ON the CPU usage jumped to 99%:
adb shell
$ top
The issue was noticed on Android 10.0 x86.
If you turn Airplane Mode OFF then the CPU usage should return to normal.
Changing the resolution worked form me. I was using 1440 x 2560 560 dpi Oreo 8.1. Now im using M-DPI Oreo 8.1
For me I turned WIFI off and I dropped from 112% usage to 10%. I would recommend doing this
Just do
$adb shell
$top
Look the PID which high CPU
$kill -9 <PID>
on api31&32: do EDIT each AVD config with Show Advanced Settings and be sure to:
Multi-Core CPU > max (<=> hw.cpu.ncore=8,
4/cores is not enough and may overheat cpu strongly)
Graphics > Hardware (GLES 2.0)
No-SDCard (<=> hw.sdCard=no)
I'm working on a new Windows Phone 7 project. Unfortunately, I have only access to a VMware Fusion instance of Windows, from where I run Visual Studio and the Phone Emulator.
My problem is that the phone emulator takes ages (well, seconds) just to show up for example the keyboard for user input (when selecting a TextBox).
I've read here that the problem comes from running a VM inside a VM.
My question is, if there is a trick which helps me to accelerate this somehow?
Thank you very much.
Cheers
EDIT:
Host machine: C2D 2.53Ghz, 4GB DDR3 RAM, SF-1200 SSD
I hate to say it, but the best solution is probably "don't run the emulator on a virtual machine". The emulator is only officially supported on a real physical machine.
Other than that, you will need to max out the resources available to the VM.
You're lucky you haven't ripped a hole in the fabric of spacetime by running an emulator on an emulator :)
See also: Windows Phone 7 emulator on a VM?, or Windows Mobile 7 Emulator Kills VMware