Visual Studio 2022 Installing Android Emulatorv31.2.10 "Specified argument was out of the range of valid values"

Stackoverflow question

Visual Studio 2022 Xamarin Android SDK installing Emulator “Operation Failed: Installing Android Emulatorv31.2.10”

Solution

https://stackoverflow.com/a/74491669/3649637

You need this component installed to install any emulator, but VS keeps saying “Specified argument was out of the range of valid values”. Below are steps to fix that:

Sdkmanager

  1. Set full control permission to your local user to the Android folder

Android full control

then uncheck “Read-only” checkbox in the General tab.

  1. Accept all licenses

Open cmd at (default) folder C:\Program Files (x86)\Android\android-sdk\cmdline-tools\7.0\bin, type this to accept all licenses:

sdkmanager.bat --licenses
  1. Install the emulator

still at that folder, type this:

sdkmanager.bat --install emulator

After this step, open sdkmanager in Visual Studio, you’ll see Android Emulator component is installed. Now you can open device manager to install new emulator.