Error launching the android project on emulator(AP

2020-01-31 03:07发布

问题:

While trying to run the created Android project, I am getting below error and the project does not launch on the emulator even though the emulator gets launched successfully.

Error:

6:04 PM Emulator: dsound: Could not initialize DirectSoundCapture

6:04 PM Emulator: dsound: Reason: No sound driver is available for use, or the given GUID is not a valid DirectSound device ID

6:04 PM Emulator: dsound: Attempt to initialize voice without DirectSoundCapture object

6:04 PM Emulator: dsound: Attempt to initialize voice without DirectSoundCapture object

6:04 PM Emulator: audio: Failed to create voice `goldfish_audio_in'

6:04 PM Emulator: %PATH%\qemu\windows-x86_64\qemu-system-x86_64.exe: warning: opening audio input failed

6:04 PM Emulator: dsound: Attempt to initialize voice without DirectSoundCapture object

6:04 PM Emulator: dsound: Attempt to initialize voice without DirectSoundCapture object

6:04 PM Emulator: audio: Failed to create voice `adc'

6:04 PM Emulator: dsound: Attempt to initialize voice without DirectSoundCapture object

6:04 PM Emulator: dsound: Attempt to initialize voice without DirectSoundCapture object

6:04 PM Emulator: audio: Failed to create voice `adc'

回答1:

It's your new Windows 10 Update. I couldn't figure it out for the life of me! I looked at 4 pages of results on Google and only saw the same old crap. So, here we go.

To Fix: Click Start, go to ⚙ Settings> Privacy Settings> Microphone. Turn On "Allow apps to access your microphone"

Also, MrPoopyB0tthole advised me of this fix as well.



回答2:

You should be able to solve the problem if you try the mentioned steps in this thread: Emulator: audio: Failed to create voice `adc'

Another trick I figured out by myself was to launch the emulator not via Debugging or Execution but from AVD Manager after starting Android Studio.

UPDATE: Mohsins solution seems a better approach because it solved the problem for me.



回答3:

I had the same and fixed it by plugging in a mic and speaker.



回答4:

I have tried the above solutions as well as the ones from this post Emulator: audio: Failed to create voice `adc'

but it turned out none of them worked for me.

At the end of the day after downloading and installing new NVidia drivers, they magically started working again.