Android emulator stopped working after Visual Studio 2022 preview installation

skynet_beta 0 Reputation points
2023-09-27T13:51:17.2266667+00:00

Hi,

I'm developing a MAUI app in Visual Studio 2022 Community edition, ver. 17.7.4.

Having the will to try .NET 8 and the updated MAUI, I downloaded and installed Visual Studio 2022 Community PREVIEW 2 17.8.0, because it's the only way (I think) to get .NET 8.

After this installation, I no longer can use the Android Emulator. Every time I start it from Tools-> Android ->Android Device Manager, I get the error

"No Android SDK instance matching the 'C:\Program Files (x86)\Android\android-sdk' path".

I checked settings in Options->Xamarin->Android Settings and in Tools->Android->SDK Manager and everything seems fine. I checked for online solutions but none worked. I also uninstalled and installed the emulator again from Tools->Android->SDK Manager->Tools.

The error keeps showing. I have attached screenshots of my configuration

Microsoft Visual Studio Community 2022

Version 17.8.0 Preview 2.0

VisualStudio.17.Preview/17.8.0-pre.2.0+34112.27

Microsoft .NET Framework

Version 4.8.04084

Installed Version: Community

Visual C++ 2022 00482-90000-00000-AA563

Microsoft Visual C++ 2022

ASP.NET and Web Tools 17.8.226.21692

ASP.NET and Web Tools

Azure App Service Tools v3.0.0 17.8.226.21692

Azure App Service Tools v3.0.0

C# Tools 4.8.0-2.23429.7+44555193fd1135b5d53a2099f76fec91e0d1ebde

C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Extensibility Message Bus 1.4.39 (main@e8108eb)

Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.

Microsoft JVM Debugger 1.0

Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Mono Debugging for Visual Studio 17.8.14 (0c9914e)

Support for debugging Mono processes with Visual Studio.

NuGet Package Manager 6.8.0

NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

Razor (ASP.NET Core) 17.8.2.2345506+ade90399d42c1a7bf92191b1c067816c0ae1c311

Provides languages services for ASP.NET Core Razor.

Test Adapter for Boost.Test 1.0

Enables Visual Studio's testing tools with unit tests written for Boost.Test. The use terms and Third Party Notices are available in the extension installation directory.

Test Adapter for Google Test 1.0

Enables Visual Studio's testing tools with unit tests written for Google Test. The use terms and Third Party Notices are available in the extension installation directory.

TypeScript Tools 17.0.20830.2001

TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools 4.8.0-2.23429.7+44555193fd1135b5d53a2099f76fec91e0d1ebde

Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual C++ for Cross Platform Mobile Development (Android) 15.0.34112.27

Visual C++ for Cross Platform Mobile Development (Android)

Visual F# Tools 17.8.0-beta.23425.10+0d3549fa5b8b6387ade191d76768405cefed8229

Microsoft Visual F# Tools

Visual Studio IntelliCode 2.2

AI-assisted development for Visual Studio.

VisualStudio.DeviceLog 1.0

Information about my package

VisualStudio.Mac 1.0

Mac Extension for Visual Studio

VSPackage Extension 1.0

VSPackage Visual Studio Extension Detailed Info

Xamarin 17.8.0.118 (main@35c256f)

Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer 17.8.1.11 (remotes/origin/d17-8@13ef934098)

Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin.Android SDK 13.2.1.2 (d17-5/a8a26c7)

Xamarin.Android Reference Assemblies and MSBuild support.

Mono: d9a6e87

Java.Interop: xamarin/java.interop/d17-5@149d70fe

SQLite: xamarin/sqlite/3.40.1@68c69d8

Xamarin.Android Tools: xamarin/xamarin-android-tools/d17-5@ca1552d

27-09-2023 15-30-42

27-09-2023 15-30-58

27-09-2023 15-33-50

Any idea how this could be fixed?

Thanks for your help

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,622 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Anna Xiu-MSFT 25,801 Reputation points Microsoft Vendor
    2023-09-28T07:23:37.13+00:00

    Hi @skynet_beta

    Welcome to Microsoft Q&A! 

    From the similar ticket, you can try the following workarounds:

    1. Make sure you have turn Windows features on for “Hyper-V” and “Windows Hypervisor Platform”.
      Note: if you have installed “Intel Hardwar Accelerated Execution Manager (HAXM)” from VS installer “Individual components”, you don’t have to turn Windows features on for “Hyper-V” and “Windows Hypervisor Platform”.
    2. Please try to remove the system image directory “C:\Program Files (x86)\Android\android-sdk\system-images\android-32(what you have created)\google_apis_playstore\x86_64
    3. Please try to clean the cache in “C:\Users\{username}\AppData\Local\Temp\xamarin-android-sdk
    4. Go to Tools > Android > Android SDK Manager… > to check if there is an “SDK needs repair” message pup up, if the message pups up, click “Repair” button, and waiting for the repair to complete. 

    Sincerely,

    Anna


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

     


  2. Aaqib Arshid 0 Reputation points
    2024-04-24T19:07:51.6+00:00

    This issue persists in latest releases of visual studio. This issue is because of the Android SDK you have downloaded and the minimum android version you are targeting in your solution. To fix this issue go to solution explorer => Platforms => Android => double click on AndroidManifest.xml to open it.

    Scroll down to find Application Target section and Select the same Minimum Android Version as your downloaded Android SDK.

    You'll then see the emulator in your VS.

    With Regards,

    Aaqib Arshid (.NET Developer)

    Contact: aaqib.arshid@gmail.com

    0 comments No comments