Reputation: 313
I am trying to build and test my Xamarin.Forms Android application on Emulator from Visual Studio The emulator is getting stuck on the screen
Screen got belowed message for a single time and after clicking Wait, it again started showing Phone is starting
Build output is mentioned below,
2>Starting deployment to pixel_2_pie_9_0_api_28 ...
2>Starting emulator pixel_2_pie_9_0_api_28 ...
2>Checking HAXM compatibility.
2>Installing HAXM...
2>HAXM installer not found: C:\Program Files (x86)\Android\android-sdk\extras\intel\Hardware_Accelerated_Execution_Manager\silent_install.bat
2>Running non-accelerated
2>C:\Program Files (x86)\Android\android-sdk\emulator\emulator.EXE -no-boot-anim -no-accel -avd pixel_2_pie_9_0_api_28 -prop monodroid.avdname=pixel_2_pie_9_0_api_28
2>Warning: Quick Boot / Snapshots not supported on this machine. A CPU with EPT + UG features is currently needed. We will address this in a future release.
2>emulator: WARNING: x86 emulation may not work without hardware acceleration!
2>emulator: WARNING: Not all modern X86 virtualization features supported, which introduces problems with slowdown when running Android on multicore vCPUs. Setting AVD to run with 1 vCPU core only.
2>Failed to open /usr/local/google/home/joshuaduong/emu/master/prebuilts/android-emulator-build/qemu-android-deps/windows_msvc-x86_64/qemu.conf, err: 2
2>dsound: Could not initialize DirectSoundCapture
2>dsound: Reason: No sound driver is available for use, or the given GUID is not a valid DirectSound device ID
2>dsound: Attempt to initialize voice without DirectSoundCapture object
2>dsound: Attempt to initialize voice without DirectSoundCapture object
2>audio: Failed to create voice `goldfish_audio_in'
2>C:\Program Files (x86)\Android\android-sdk\emulator\qemu\windows-x86_64\qemu-system-x86_64.exe: warning: opening audio input failed
2>dsound: Attempt to initialize voice without DirectSoundCapture object
2>dsound: Attempt to initialize voice without DirectSoundCapture object
2>audio: Failed to create voice `adc'
2>emulator: INFO: QtLogger.cpp:68: Critical: Uncaught TypeError: Cannot read property 'update' of undefined (qrc:/html/js/location-mock-web-channel.js:130, (null))
2>emulator: INFO: boot completed
2>emulator: INFO: boot time 829388 ms
2>emulator: Increasing screen off timeout, logcat buffer size to 2M.
2>emulator: Revoking microphone permissions for Google App.
UPDATE
I found the message given in the image below, after launching emulator separately from Device Manager and building Android solution.
And this is the output shown:
2>Starting deployment to pixel_2_pie_9_0_api_28 ...
2>Starting emulator pixel_2_pie_9_0_api_28 ...
2>C:\Program Files (x86)\Android\android-sdk\emulator\emulator.EXE -no-boot-anim -avd pixel_2_pie_9_0_api_28 -prop monodroid.avdname=pixel_2_pie_9_0_api_28
2>emulator: ERROR: Running multiple emulators with the same AVD is an experimental feature.
2>Please use -read-only flag to enable this feature.
2>Emulator pixel_2_pie_9_0_api_28 cannot be started.
========== Build: 1 succeeded, 0 failed, 17 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
But still there are no errors in output window after clicking either Yes or No on deployment errors popup.
Upvotes: 0
Views: 2650
Reputation: 1225
In my case, I have to reset the emulator. Steps:
Upvotes: 0
Reputation: 313
Answering my own qeustion.
The first issue was with HAXM, which was not installed.
Then about the deployment error, in my case the name of the emulator was changed from the default one from Android Device Manager. So I changed it back to the default name, the same which is given on the time of adding new device(ex. Nexus 5X).
It worked for my case and then it took so long to get built and deployed!
Upvotes: 1