Cannot Get Any Emulator to Work

onefootswillonefootswill ✭✭AUMember ✭✭
edited July 14 in General

Hi. Just downloaded the Xamarin tooling for Visual Studio by checking the relevant box in the VS Installer.

I have installed v26.1.1 of the Android SDK Tools (they were installed with the tooling).

I've created 2 emulators (one based on a Nexus and the other a Pixel).

Neither of them work with a basic, Xamarin (Android) project.

For the Pixel, the error message is :

dsound: Reason: No sound driver is available for use, or the given GUID is not a valid DirectSound device ID
1>------ Build started: Project: EmulatorTest, Configuration: Debug Any CPU ------
dsound: Attempt to initialize voice without DirectSoundCapture object
dsound: Attempt to initialize voice without DirectSoundCapture object
audio: Failed to create voice goldfish_audio_in' C:\Program Files (x86)\Android\android-sdk\emulator\qemu\windows-x86_64\qemu-system-x86_64.exe: warning: opening audio input failed dsound: Attempt to initialize voice without DirectSoundCapture object dsound: Attempt to initialize voice without DirectSoundCapture object audio: Failed to create voiceadc'
dsound: Attempt to initialize voice without DirectSoundCapture object
dsound: Attempt to initialize voice without DirectSoundCapture object
audio: Failed to create voice `adc'

For the nexus, the emulator spun up, but the debugger had exited.
I noticed the following message:
Couldn't connect debugger. You can see more details in Xamarin Diagnostic output and the full exception on logs.

Not sure what logs that is referring to.

Any idea why this doesn't "just work"?

Best Answer

  • onefootswillonefootswill ✭✭ AU ✭✭
    Accepted Answer

    I finally got this working. Editing the emulator settings in Device Manager, I unchecked the checkbox next to the setting hw.audioinput

    I'm pretty sure I tried that when I first opened the ticket. So not sure why it worked now. ¯_(ツ)_/¯

Answers

  • onefootswillonefootswill ✭✭ AUMember ✭✭

    Bump

  • JohnHJohnH ✭✭✭✭✭ GBMember ✭✭✭✭✭

    What version of Visual Studio? Mac or Windows?
    If Windows, what version?

  • onefootswillonefootswill ✭✭ AUMember ✭✭

    I'm using the following:

    Visual Studio 2019
    Windows 10 Pro Version 1903

    I can run things on actual devices. But not on emulators.

  • JohnHJohnH ✭✭✭✭✭ GBMember ✭✭✭✭✭

    @onefootswill said:
    I'm using the following:

    Visual Studio 2019
    Windows 10 Pro Version 1903

    I can run things on actual devices. But not on emulators.

    Looks like a library you are using called Goldfish is the culprit, no?

  • onefootswillonefootswill ✭✭ AUMember ✭✭

    I can see Goldfish in the text of the error there, but it is nothing I have added to the project.

    I basically created an "out of the box" project (Xamarin Native i.e. not forms) and pressed F5.

  • onefootswillonefootswill ✭✭ AUMember ✭✭

    Things are gotten worse. I used to be able to open up a window for the Android SDK configuration with tables etc.

    Nowe, when I go Tools > Android > Android SDK Manager , the following window loads

    It does not matter which radio button I select, the outcome is the same. If I hit F5 (with one of the emulators having the context), the output window just says :

    "Starting emulator pixel_pie_9_api_28 ...
    Emulator pixel_pie_9_api_28 cannot be started.
    Project 'Times' requires the following components installed on your machine:
    Xamarin.Android for Visual Studio requires Android SDK. Please click here to configure.

    In order to resolve this, please go to the Error List window, make sure "Build + IntelliSense" is selected and double-click on the error above.
    1>------ Build started: Project: Times, Configuration: Debug Any CPU ------
    Build has been canceled.Runtime checks completed"

    Shouldn't Xamarin have taken the responsibility of installing the Android SDK? Do people install this separately, manually?,

  • JohnHJohnH ✭✭✭✭✭ GBMember ✭✭✭✭✭

    @onefootswill said:
    Things are gotten worse. I used to be able to open up a window for the Android SDK configuration with tables etc.

    Nowe, when I go Tools > Android > Android SDK Manager , the following window loads

    It does not matter which radio button I select, the outcome is the same. If I hit F5 (with one of the emulators having the context), the output window just says :

    "Starting emulator pixel_pie_9_api_28 ...
    Emulator pixel_pie_9_api_28 cannot be started.
    Project 'Times' requires the following components installed on your machine:
    Xamarin.Android for Visual Studio requires Android SDK. Please click here to configure.

    In order to resolve this, please go to the Error List window, make sure "Build + IntelliSense" is selected and double-click on the error above.
    1>------ Build started: Project: Times, Configuration: Debug Any CPU ------
    Build has been canceled.Runtime checks completed"

    Shouldn't Xamarin have taken the responsibility of installing the Android SDK? Do people install this separately, manually?,

    That really does sound strange. Installing Visual Studio will install the prerequisites for you if you select the correct install options.
    Without being able to see what you have installed or done since so I would suggest uninstalling and starting again. I myself installed a fresh VS2019 on a new laptop on Monday and was up and running building for iOS and Android by the afternoon. Just make sure you tick the mobile dev options when you run the installer (I know you said you did that too).

  • NealTibrewalaNealTibrewala USMember

    I just did a fresh install of vs 2019 community (never been on this pc before). I then created a new project, Xamarin.Forms (shell) and I'm getting the same broken dialog as @onefootswill . Neither radio button can be clicked.

  • kenricmckenziekenricmckenzie ✭✭ GBUniversity ✭✭

    If you still having issues...

    In Visual Studio make sure it is pointing to the correct Android Java Development Kit (JDK) location & Android SDK location VS -> Tools -> Options -> Xamarin -> Android Settings

    Also sometimes it helps if you run VS in Admin mode as your computer security permissions could be blocking access to the JDK & SDK and other stuff.

  • vitaliy0101vitaliy0101 ✭✭ Member ✭✭

    have touched nothing since i opened the projekt
    it just wont let me open the app with the emulator

    Console:
    Starting emulator my_device ...
    Checking HAXM compatibility.
    Installing HAXM...
    HAXM installer not found: C:\Program Files (x86)\Android\android-sdk\extras\intel\Hardware_Accelerated_Execution_Manager\silent_install.bat
    Emulator my_device cannot be started.
    Runtime checks completed
    NuGet package restore canceled.
    Build has been canceled.

    please help, i have no idea about this
    i just want to get started

  • onefootswillonefootswill ✭✭ AUMember ✭✭
    Accepted Answer

    I finally got this working. Editing the emulator settings in Device Manager, I unchecked the checkbox next to the setting hw.audioinput

    I'm pretty sure I tried that when I first opened the ticket. So not sure why it worked now. ¯_(ツ)_/¯

Sign In or Register to comment.