High CPU usage with Android emulator (qemu-system-i386.exe)

前端 未结 20 947
醉话见心
醉话见心 2020-12-04 05:48

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

20条回答
  •  感情败类
    2020-12-04 06:37

    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.

提交回复
热议问题