Android emulator uses 100% cpu even if nothing i r

2019-01-22 01:35发布

I have a celeron processor :/ and android emulator on eclipse uses 100% of cpu and hangs everything unless I kill it . I was just trying a hello android program from a book and don`t know much about android or even eclipse .I have the android-eclipseplugin installled .

Can someone help me with is ?thanks!

10条回答
Ridiculous、
2楼-- · 2019-01-22 02:16

I had this issue running the emulator on Ubuntu 14.04. Disabling the audio does bring down the CPU usage, but in case you need audio to work, it can be fixed by adding a symlink:

sudo ln -s /usr/lib/x86_64-linux-gnu/libpulse.so.0 /usr/lib/x86_64-linux-gnu/libpulse.so

The reason for this is that the emulator tries to use pulseaudio as the backend, but will be unable to link to libpulse.so, which does not exist on Ubuntu (unless you installed the libpulse-dev package). Then it will fall back to ALSA, which constantly calls poll, causing 100% CPU usage.

A fix for the emulator is coming, but for now, adding the symlink solves the issue.

查看更多
We Are One
3楼-- · 2019-01-22 02:17

I had same issue on my macOS High Sierra and for me helps to create new AVD device and choose CPU/ABI = x86_64, not x86 in Android version dialog. Hope that helps.

查看更多
三岁会撩人
4楼-- · 2019-01-22 02:18

The emulator is notoriously slow to start; it can take 15 minutes or longer on an underpowered machine. You can speed start-up a bit by passing the -no-boot-anim to the emulator start-up command. Other emulator options are described here. Also, some AVDs start faster than others. Try creating an AVD with the lowest level SDK that is useful for you.

Once the emulator has started, you don't need to shut it down. When an app exits (or crashes, or whatever), you can just run it again.

查看更多
来,给爷笑一个
5楼-- · 2019-01-22 02:19

For me, it was unchecking the Multi-Core CPU check box

enter image description here

查看更多
登录 后发表回答