How to fix "Could not initialize DirectSoundCapture" in Android Studio - android-emulator

I was just using Android Studio without issue and then one of the times I ran the project I got a list of errors saying "Emulator: dsound: Could not initialize DirectSoundCapture".
I have already looked up the issue and tried updating windows, updating android studio, updating drivers, un-ticking the "Enable instant run to hot swap code/resource changes on deploy" box in the settings, going to windows settings and enabling the microphone to be used by apps and I can't find any solution.
10:02 PM Emulator: dsound: Could not initialize DirectSoundCapture
10:02 PM Emulator: dsound: Reason: No sound driver is available for use, or the given GUID is not a valid DirectSound device ID
10:02 PM Emulator: dsound: Attempt to initialize voice without DirectSoundCapture object
10:02 PM Emulator: dsound: Attempt to initialize voice without DirectSoundCapture object
10:02 PM Emulator: audio: Failed to create voice `goldfish_audio_in'
10:02 PM Emulator: C:\Users\Joseph\AppData\Local\Android\Sdk\emulator\qemu\windows-x86_64\qemu-system-x86_64.exe: warning: opening audio input failed
10:02 PM Emulator: dsound: At
10:02 PM Emulator: tempt to initialize voice without DirectSoundCapture object
10:02 PM Emulator: dsound: Attempt to initialize voice without DirectSoundCapture object
10:02 PM Emulator: audio: Failed to create voice `adc'
10:02 PM Emulator: dsound: Attempt to initialize voice without DirectSoundCapture object
10:02 PM Emulator: dsound: Attempt to initialize voice without DirectSoundCapture object
10:02 PM Emulator: audio: Failed to create voice `adc'
The emulator just has a black screen and won't do anything else, I don't care if the emulator makes sound or not I just want to see the visuals.

Easy Fix....
i am running windows 10 but should be same for other versions.
Right click the audio icon at bottom right and click open sound settings then under the input section in the right window pane click manage sound devices and then enable stereo mix under input devices...
now the emulator will run without the audio error..

I managed to fix the issue by plugging my microphone back into my computer. Not sure why that causes the issue but once plugged back in, the errors disappeared. The black screen still appeared but I made another virtual device in AVD manager and used that which worked fine.

I'm also getting the same error while building the project, when I noticed that my system is not having the In-Built Microphone then I connected an External Microphone then it worked for me..

A Quick fix is to wipe data (Tools>AVD Manager>Drop-down under actions>wipe data) from emulator each time the issue arises.

Related

App doesn’t run Android Studio emulator issue

When I start the Emulator in Android Studio it runs, but it doesn't open my application. like this “ there message down “ waiting for target device comes online “
I use Ryzen 7 2700x, installed all SDK tools and use system image (recommended, Other images "ARM64-v8a,ARMEABI-v7a").
Another problem there is some error shown:
Emulator: dsound: Could not initialize DirectSoundCapture
Emulator: dsound: Reason: No sound driver is available for use, or the given GUID is not a valid DirectSound device ID
Emulator: dsound: Attempt to initialize voice without DirectSoundCapture object
Emulator: dsound: Attempt to initialize voice without DirectSoundCapture object
Emulator: audio: Failed to create voice `goldfish_audio_in'
Emulator: C:\Users\USER\AppData\Local\Android\Sdk\emulator\qemu\windows-x86_64\qemu-system-x86_64.exe: warning: opening audio input failed

android studio emulator sound

I am working with android studio everything was working perfectly but then I decided to try sqlite3 with android studio and in my first basic app i am getting emulator error like
16:50 Emulator: dsound: Could not initialize DirectSoundCapture
16:50 Emulator: dsound: Reason: No sound driver is available for use,
or the given GUID is not a valid DirectSound device ID
16:50 Emulator: dsound: Attempt to initialize voice without
DirectSoundCapture object
16:50 Emulator: dsound: Attempt to initialize voice without
DirectSoundCapture object
16:50 Emulator: audio: Failed to create voice `goldfish_audio_in'
16:50 Emulator:
C:\Users..\Android\Sdk\emulator\qemu\windows-x86_64\qemu-system-x86_64.exe:
warning: opening audio input failed
so I got the solution for that
first of all close your android studio restart your PC and open studio it will ask you in the right hand corner for the updates if there is any available click on that. It will take a while, but can solve the problem.
If no. 1 is not useful for you try to check the windows update and then repeat step 1
turn on microphone on windows 10 and install direct x
if you dont have input audio? intall virtual audio cable

Android emulator won't start something not found

Android emulator won't start something not found:
21:40 Emulator: [4748]:ERROR:android/android-emu/android/qt/qt_setup.cpp:28:Qt library not found at C:\Android\android-sdk\emulator\lib64\qt\lib
21:40 Emulator: Could not launch 'C:\Android\android-sdk\emulator/qemu/windows-x86_64/qemu-system-aarch64.exe': No such file or directory
21:40 Emulator: Process finished with exit code 2
21:41 Emulator: [1456]:ERROR:android/android-emu/android/qt/qt_setup.cpp:28:Qt library not found at C:\Android\android-sdk\emulator\lib64\qt\lib
21:41 Emulator: Could not launch 'C:\Android\android-sdk\emulator/qemu/windows-x86_64/qemu-system-aarch64.exe': No such file or directory
21:41 Emulator: Process finished with exit code 2
I have gone to this issue and enable Android Emulator option in the Android Studio will fix it.
Could it help!
I can't run the Android Emulator
From your question I noticed the following error log:
21:41 Emulator: [1456]:ERROR:android/android-emu/android/qt/qt_setup.cpp:28:Qt library not found at C:\Android\android-sdk\emulator\lib64\qt\lib
21:41 Emulator: Could not launch 'C:\Android\android-sdk\emulator/qemu/windows-x86_64/qemu-system-aarch64.exe': No such file or directory
This tells us that there is an issue with your Android Virtual Devices SDK.
I suggest you completely uninstall and then reinstall the Android Virtual Devices SDK (AVD Manager).
You can use the following instructions to help you out:
To uninstall/install the AVD Manager, go to Tools > SDK Manager > Android SDK and select the SDK Tools Tab. Then scroll down until you find the Android AVD/Virtual Devices SDK.

Can not launch Emulator in Android

I have tried to launch the emulator in Android but I am getting the dialogue box displaying.
I have tried reading all the answers related to this but I have still failed.
emulator: WARNING: Crash service did not start
init: Could not find wglGetExtensionsStringARB!
getGLES1ExtensionString: Could not find GLES 1.x config!
Failed to obtain GLES 1.x extensions string!
emulator: WARNING: VM heap size set below hardware specified minimum of 128MB
emulator: WARNING: Setting VM heap size to 256MB
emulator: WARNING: Classic qemu does not support SMP. The hw.cpu.ncore option from your config file is ignored.
emulator: device fd:856
HAXM is working and emulator runs in fast virt mode
emulator: ERROR: Could not initialize OpenglES emulation, use '-gpu off' to disable it.
Could not initialize emulated framebuffer
Screenshot

Google TV emulation starting up with a non Google TV image and emulator-arm

I have the latest Google TV Addon (rev 2) and the latest emulator. My linux box also supports KVM and when I pass the command kvm-ok, I do get the success messages
(INFO: Your CPU supports KVM extensions
INFO: /dev/kvm exists
KVM acceleration can be used)
I have created a new AVD via Eclipse using Android AVD and SDK Manager and by setting the Target Name as: Google Tv Addon
However, when I start up the AVD instance (command line or Eclipse), I see a normal Android smartphone instance loading up in the skin of the Google TV (see all the phone apps and nothing happens when I click on the TV specific buttons in the navigation bar). In the verbose logs I do NOT see KVM Auto enabled message and from the excerpts of logs (added below), it looks like the default kernel, system and userdata images are being loaded instead of the images from the /bin/android-sdk-linux_x86/add-ons/addon_google_tv_google_inc_12/images/x86. It also looks like emulator-arm is being executed instead of emulator-x86. Why is this happening? How could I solve this problem? I would greatly appreciate any help in this regard.
emulator: Android virtual device file at: <path>/.android/avd/name1.ini
emulator: virtual device content at <path>/.android/avd/name1.avd
emulator: virtual device config file: <path>/.android/avd/name1.avd/config.ini
emulator: using core hw config path: <path>/.android/avd/name1.avd/hardware-qemu.ini
emulator: Found AVD target API level: 12
emulator: found skin '720p' in directory: <path>/bin/android-sdk-linux_x86/add-ons/addon_google_tv_google_inc_12/skins
emulator: autoconfig: -skin 720p
emulator: autoconfig: -skindir <path>/bin/android-sdk-linux_x86/add-ons/addon_google_tv_google_inc_12/skins
emulator: keyset loaded from: <path>/.android/default.keyset
emulator: trying to load skin file '<path>/bin/android-sdk-linux_x86/add-ons/addon_google_tv_google_inc_12/skins/720p/layout'
emulator: skin network speed: 'full'
emulator: skin network delay: 'none'
emulator: autoconfig: -kernel <path>/bin/android-sdk-linux_x86/platforms/android-12/images//kernel-qemu
emulator: autoconfig: -ramdisk <path>/bin/android-sdk-linux_x86/platforms/android-12/images//ramdisk.img
emulator: Using initial system image: <path>/bin/android-sdk-linux_x86/platforms/android-12/images//system.img
emulator: autoconfig: -data <path>/.android/avd/name1.avd/userdata-qemu.img
emulator: autoconfig: -initdata <path>/.android/avd/name1.avd/userdata.img
emulator: autoconfig: -cache <path>/.android/avd/name1.avd/cache.img
emulator: Physical RAM size: 1024MB
Content of hardware configuration file:
hw.cpu.arch = arm
....................
Cheers,
S
For a workaround, please try editing the ~/.android/[AVD_name].avd/config.ini file, and change "arm" to "x86" for the hw.cpu.arch and abi.type lines.