KLeo
KLeo

Reputation: 115

VS 2022 can't start Android Emulator

I just updated my Visual Studio from 2019 to 2022. I encountered no problems when I am using the 2019 version, the emulators are launching and working well. But ever since I installed 2022, the emulators starts for a while then close immediately.

Here are additional details: Output Window

Starting emulator pixel_5_-_api_33 ...
1>Waiting for emulator to be ready...
C:\Program Files (x86)\Android\android-sdk\emulator\emulator.EXE -netfast -accel on -avd pixel_5_-_api_33 -prop monodroid.avdname=pixel_5_-_api_33
Emulator pixel_5_-_api_33 was stopped.
1>Starting deployment to pixel_5_-_api_33 ...
1>Starting emulator pixel_5_-_api_33 ...
1>C:\Program Files (x86)\Android\android-sdk\emulator\emulator.EXE -netfast -accel on -avd pixel_5_-_api_33 -prop monodroid.avdname=pixel_5_-_api_33
1>Emulator pixel_5_-_api_33 was stopped.
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
========== Elapsed 00:50.443 ==========

Here's a screenshot of the emulator starting, then closes immediately:

enter image description here

What can I do to fix this? Thank you in advance :)

Upvotes: 7

Views: 12953

Answers (5)

ViBi
ViBi

Reputation: 637

For me "Factory reset" has done the trick

enter image description here

Upvotes: 0

Xtremexploit
Xtremexploit

Reputation: 329

I had the same problem, to fix it create a new instance of an Android device but don't edit it afterwards. Somehow that causes the emulator to stop working with visual studio.

enter image description here

Upvotes: 0

Alex
Alex

Reputation: 841

Check that you have enough disk space. Run this command from your Output window manually: C:\Program Files (x86)\Android\android-sdk\emulator\emulator.EXE ... And it will show you the exact error. Something like ERROR | Not enough space to create userdata partition.

Upvotes: 1

Riley Christian
Riley Christian

Reputation: 225

I had the same problem and here is the solution i found : Check if Windows Hypervisor Platform is enabled. To do that open Windows Features tool executing choosing Turn Windows features on or off start option and verify if Hyper-V and Windows Hypervisor Platform are enabled.

Upvotes: 8

Nemanja Simic
Nemanja Simic

Reputation: 11

"I had the same problem. The solution for me was to install Android Studio, then run the build. After everything finished, I tried running it again in Visual Studio 2022, and it worked. I got the same screen again, but it remained active. When I clicked "dismiss", everything worked as it should. I hope this helps you too."

Upvotes: 1

Related Questions