Running Android emulator with -noaudio option returns “qemu-system-i386.exe: -audio: invalid option”

后端 未结 3 970
自闭症患者
自闭症患者 2021-02-14 08:30
  1. I\'m running Windows 10, 64 bit, Android Studio 2.2.2. When creating an AVD from the Android SDK\'s AVD Manager, I don\'t see an option to completeley disable audio (input
3条回答
  •  醉话见心
    2021-02-14 08:58

    Thanks to @Dawid Drozd's answer, I've created a Windows batch script that will run AVD without sound input/output. Just give the script a parameter of AVD name.

    The trick is to run set QEMU_AUDIO_DRV=none before executing AVD.

    @echo off
    if "%1"=="" goto usage
    set QEMU_AUDIO_DRV=none
    @echo Running AVD "%1" without sound...
    @echo.
    %ANDROID_HOME%\tools\emulator.exe -avd %1
    goto :eof
    
    :usage
    @echo.
    @echo -----------------------------------
    @echo Usage: %0 ^
    @echo -----------------------------------
    @echo.
    @timeout 3 >0
    exit /B 1
    

提交回复
热议问题