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条回答
手持菜刀,她持情操
2楼-- · 2019-01-22 01:54

Niels' answer worked well for me https://stackoverflow.com/a/7706018 in that the emulator stopped using 100% CPU (dropped down to 10-15%) Furthermore it had another useful "side effect". I noticed that playing video in Totem or music in RhythmBox would block while the emulator was running. VLC would play video but refuse to play the accompanying soundtrack for the video. As soon as the emulator was killed, music would start playing. Niels' answer to set "Audio playback support" to "no" prevents this issue. I am running Ubuntu 11.04 and Android emulator version 13.0 (build_id OPENMASTER-172639).

查看更多
戒情不戒烟
3楼-- · 2019-01-22 01:54

I strongly recommend not to use android emulator. Use VirtualBox + android x86 OS (you can download it here ), and you will get real perfomance increase.

Unfortunately, as far as i remember, it is not from google and it supports only Android 2.2. I really do not understand, why google is not going to make simulator as fast as iPhone simulator , or to make official x86 release for debugging. I do not need emulating ARM processor instructions and I think 99% developers do no need it too.

查看更多
等我变得足够好
4楼-- · 2019-01-22 01:58

The Android emulator is emulating an ARM CPU without hardware acceleration which can be pretty slow even on a core2duo for example.

You can try to reduce the screen resolution of the virtual device which should result in a small performance increase.

查看更多
The star\"
5楼-- · 2019-01-22 01:59

I've had the exact same problem and found a solution that works for me. In the config of the AVD I've set an extra flag "Audio playback support" to "no". I've also made sure the AVD has 1GB of RAM.

This worked for me.

查看更多
女痞
6楼-- · 2019-01-22 02:14

As others have said, the solution is disabling sound. Unfortunately, in recent Android Studio releases (I'm using 1.4) the option to disable sound has been removed from the GUI. To disable sound you can do it either by launching the emulator from the command line with the -noaudio flag, or by editing the AVD's config file and setting the following parameters:

hw.audioInput=no
hw.audioOutput=no

On Linux, I found that file at ~/.android/avd/myAVD.avd/config.ini

查看更多
你好瞎i
7楼-- · 2019-01-22 02:15

One alternative that worths mentioning is Genymotion. It's an android emulator based on VirtualBox, with pre-created images. It supports some features the stock Android emulator isn't very good at, like Wifi 3G, Bluetooth, GPS (with a fancy Google Maps integration, so you don't have to find coordinates manually), multiple screens, etc.

It worth giving it a try at http://www.genymotion.com/

查看更多
登录 后发表回答