Fix VS 2026 MAUI Android Emulator and Build Errors

Struggling with VS 2026 MAUI Android build errors? Fix XA5300, XA5207, empty emulator dropdowns, silent build cancellations, and deployment failures with tested step-by-step solutions and CLI workarounds.

If your Visual Studio 2026 MAUI Android project refuses to build, the emulator list is empty, or deployment silently fails — trust me, you're not alone. Since VS 2026 (v18.x) dropped with .NET 10 support, developers everywhere have been hitting a wall of issues with the Android toolchain. Whether you're dealing with a MAUI Android emulator not working situation, a cryptic dotnet MAUI build failed error, or a deployment that appears to complete but produces absolutely nothing, this guide walks you through every known issue and its tested fix.

This isn't a quick-tips article. We're covering the full spectrum of Visual Studio 2026 Android build errors — from missing SDK paths and emulator visibility bugs to hardware acceleration misconfiguration and silent build cancellations. Each section includes diagnostic steps, working code, and environment configuration so you can get back to actually shipping your .NET MAUI cross-platform app.

Why Visual Studio 2026 MAUI Android Builds Fail

Visual Studio 2026 introduced a fundamentally rearchitected Android toolchain integration. While the 64-bit IDE brings faster solution loads and .NET 10 support, several regressions in the Android SDK management layer have made MAUI Android development unreliable for a lot of teams. The core problems fall into these categories:

  • SDK path resolution failures: VS 2026 sometimes references a different SDK root than the one it installed, causing builds to fail with XA5300 or XA5207 errors.
  • Emulator visibility requires admin rights: After updating to VS 2026 (18.1.x), the Android emulator dropdown is empty unless you run the IDE as administrator. Yeah, really.
  • Silent build cancellations: Projects targeting Android API 35 on .NET 10 may cancel the build without producing any error messages in the Output window.
  • Deployment succeeds but app never launches: The build pipeline completes, but the emulator or physical device never actually receives the APK.
  • Hardware acceleration conflicts: The deprecation of HAXM and the upcoming sunset of AEHD (end of 2026) have introduced hypervisor configuration mismatches.

Figuring out which category your problem falls into is the first step toward a fix. The sections below are organized by symptom so you can jump directly to your issue.

Common MAUI Android Error Codes Explained

Before diving into fixes, here's a quick reference of the error codes you're most likely to encounter when your Visual Studio 2026 MAUI Android build fails.

XA5300 — Android SDK Directory Not Found

This error means the MSBuild process can't locate your Android SDK installation. It typically shows up when:

  • The ANDROID_HOME or ANDROID_SDK_ROOT environment variable is missing or points to a nonexistent directory.
  • VS 2026 installed the SDK in a per-user location but the build process looks in the system-wide path.
  • You previously had VS 2022 installed and its SDK path is conflicting with VS 2026.
error XA5300: The Android SDK directory could not be found.
Check that the Android SDK is installed and set the AndroidSdkDirectory MSBuild property
to the path of the SDK.

XA5207 — Could Not Find android.jar

This one means the specific Android platform SDK for your target API level isn't installed. For example, if your .csproj targets net10.0-android35.0, you need Android SDK Platform 35 installed locally.

error XA5207: Could not find android.jar for API level 35.
This means the Android SDK platform for API level 35 is not installed.

XA0000 — General Unhandled Exception

This is basically a catch-all error that typically surfaces when the build system can't resolve your Android target framework version. Check that your TargetFramework in the .csproj file is valid and that the corresponding workload is installed.

error XA0000: Could not determine $(AndroidApiLevel) or $(TargetFrameworkVersion).

XA0010 — Could Not Retrieve Android ABI

Commonly seen on macOS, this error pops up when the emulator or device is unreachable:

error XA0010: Could not retrieve the Android ABI for the attached device or emulator.
Please reconnect the device or restart the emulator, and try again.

How to Fix Android Emulator Not Showing in Visual Studio 2026

Honestly, this is one of the most frustrating issues in VS 2026. You create or open a MAUI project, set Android as the target, and the toolbar shows... nothing. No available devices. Just an empty dropdown staring back at you. This is a confirmed bug in VS 2026 (18.1.x) tracked on the dotnet/maui GitHub repository.

Symptom

The Android Emulator option doesn't appear in the debug target dropdown. The device list is completely empty, even though you've previously created Android Virtual Devices (AVDs).

Root Cause

VS 2026 fails to enumerate available emulators when running without administrator privileges. The IDE can't read the AVD configuration directory or communicate with the emulator process due to permission restrictions introduced in the new toolchain layer. I spent an embarrassing amount of time thinking my emulators had somehow vanished before figuring this one out.

Fix 1: Launch the Android Device Manager Manually

This is the quickest workaround. Open Visual Studio 2026 and navigate to Tools > Android > Android Device Manager. When prompted for administrator credentials, enter them. Manually start the emulator from the Device Manager. Once the emulator is running, go back to the main VS window — the emulator should now appear in the debug target list, even though VS itself isn't running as admin.

Fix 2: Ensure Android Is the First TargetFramework

The MAUI project template lists target frameworks in your .csproj file. If Android isn't the first entry, VS 2026 may not load the Android emulator options at all. Open your project file and verify the order:

<PropertyGroup>
  <TargetFrameworks>net10.0-android;net10.0-ios;net10.0-maccatalyst</TargetFrameworks>
  <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">
    $(TargetFrameworks);net10.0-windows10.0.19041.0
  </TargetFrameworks>
</PropertyGroup>

Make sure net10.0-android is the first item. Save, close the solution, and reopen it.

Fix 3: Run Visual Studio as Administrator

As a temporary workaround, right-click the Visual Studio 2026 shortcut and select Run as administrator. This resolves the permission issue that prevents emulator enumeration. Not ideal for team environments where admin passwords can't be shared freely, but it works.

Fix 4: Update the Android Emulator Component

Open Tools > Android > Android SDK Manager in VS 2026. Switch to the Tools tab and check if the Android Emulator entry has an update available. Install any pending updates, restart VS, and check the emulator list again.

How to Fix dotnet MAUI Build Failed — Android SDK Not Found (XA5300)

The XA5300 error is the single most common build failure after upgrading to Visual Studio 2026. The fix depends on whether the SDK is actually missing or just misconfigured.

Step 1: Verify the SDK Is Installed

Open a terminal and check whether the Android SDK exists at the expected location:

:: Windows — check default VS 2026 location
dir "C:\Program Files (x86)\Android\android-sdk\platforms"

:: Per-user install location
dir "%LOCALAPPDATA%\Android\Sdk\platforms"

If the platforms directory is empty or missing, the SDK isn't fully installed.

Step 2: Set Environment Variables

VS 2026 doesn't always propagate the SDK path to the MSBuild process. Set these environment variables explicitly:

:: Windows — run in an elevated Command Prompt
setx ANDROID_HOME "C:\Program Files (x86)\Android\android-sdk"
setx ANDROID_SDK_ROOT "C:\Program Files (x86)\Android\android-sdk"

On macOS or Linux:

# Add to ~/.zshrc or ~/.bashrc
export ANDROID_HOME="$HOME/Library/Android/sdk"
export ANDROID_SDK_ROOT="$ANDROID_HOME"
export PATH="$PATH:$ANDROID_HOME/platform-tools:$ANDROID_HOME/cmdline-tools/latest/bin"

After setting the variables, close and reopen your terminal, then restart Visual Studio.

Step 3: Use the InstallAndroidDependencies Build Target

The most reliable way to make sure the correct SDK components are installed is the built-in MSBuild target. It examines your project and installs exactly the components you need:

dotnet build -t:InstallAndroidDependencies -f net10.0-android ^
  -p:AndroidSdkDirectory="C:\Program Files (x86)\Android\android-sdk" ^
  -p:JavaSdkDirectory="C:\Program Files\Microsoft\jdk-21.0.6-hotspot" ^
  -p:AcceptAndroidSDKLicenses=True

On macOS:

dotnet build -t:InstallAndroidDependencies -f net10.0-android \
  -p:AndroidSdkDirectory="$HOME/Library/Android/sdk" \
  -p:AcceptAndroidSDKLicenses=True

This target handles API level installation, build tools, platform tools, and license acceptance in a single command. It's genuinely one of the more useful things the .NET team has added.

Step 4: Explicitly Set the SDK Path in Your Project File

If environment variables aren't being picked up, you can hardcode the path in your .csproj:

<PropertyGroup Condition="'$(TargetFramework)' == 'net10.0-android'">
  <AndroidSdkDirectory>C:\Program Files (x86)\Android\android-sdk</AndroidSdkDirectory>
</PropertyGroup>

This isn't the cleanest approach — and you probably don't want to commit it to source control without a conditional — but it guarantees the build finds the SDK regardless of environment configuration.

How to Fix Could Not Find android.jar for API Level (XA5207)

This error means the SDK platform for a specific API level is missing from your local installation. VS 2026 projects targeting .NET 10 default to Android API 35, which must be explicitly installed.

Option A: Use the Android SDK Manager in Visual Studio

Navigate to Tools > Android > Android SDK Manager. On the Platforms tab, check the box for the API level your project targets (e.g., Android 15.0 — API 35). Click Apply Changes and wait for the download to complete.

Option B: Install via Command Line

If the SDK Manager inside VS 2026 is unreliable — and from what I've seen, it often is — use the sdkmanager command-line tool directly:

:: Navigate to your cmdline-tools bin directory
cd "C:\Program Files (x86)\Android\android-sdk\cmdline-tools\latest\bin"

:: Install Android API 35 platform
sdkmanager.bat "platforms;android-35" "build-tools;35.0.0"

Verify the installation:

sdkmanager.bat --list_installed

You should see platforms;android-35 in the output.

Option C: Use InstallAndroidDependencies

As described in the previous section, the MSBuild target automatically installs the correct API level based on your project configuration.

How to Fix Build Succeeds But App Does Not Launch on Emulator

This is a particularly maddening problem because the build completes successfully, but the application never appears on the emulator or physical device. The Output window may show deployment messages, but the whole process just... stalls. No error, no crash, nothing.

Diagnosis

Enable verbose logging to identify where deployment stalls. In VS 2026, go to Tools > Options > Projects and Solutions > Build and Run. Set MSBuild project build output verbosity to Diagnostic. Rebuild and check the Output window for the last successful step.

Fix 1: Delete and Recreate the Android Virtual Device

Corrupted AVD configurations are a common cause. Open Tools > Android > Android Device Manager, delete the problematic emulator, and create a new one. Choose an x86_64 system image (not ARM) for best compatibility with hardware acceleration.

Fix 2: Cold Boot the Emulator

Quick boot snapshots can become corrupted over time. In the Android Device Manager, click the dropdown arrow next to the emulator's Start button and select Cold Boot. This forces a full restart of the emulator OS rather than resuming from a snapshot.

Fix 3: Check ADB Connection

The Android Debug Bridge (ADB) may have lost its connection to the emulator. Open a terminal and run:

adb devices

If the emulator is listed as offline or not listed at all:

adb kill-server
adb start-server
adb devices

The emulator should now appear as device (not offline or unauthorized).

Fix 4: Check for Conflicting Visual Studio Installations

If you've got VS 2022 or earlier versions installed alongside VS 2026, their Android toolchains may conflict. Verify in each VS installation that the SDK paths point to the same directory. Better yet, use a single shared SDK location and set ANDROID_HOME explicitly.

How to Fix Build Silently Canceled With No Error Message

Some developers report that clicking Run in VS 2026 produces "Build has been canceled" in the Output window with no preceding error. Nothing else. Just... canceled. This has been observed with projects targeting Android API 35 on .NET 10.

Root Cause

This typically happens when the build process encounters an unhandled exception in the Android build targets that VS 2026 swallows rather than reporting. Common triggers include:

  • Missing or incompatible build-tools version.
  • Java SDK version mismatch — .NET 10 Android requires JDK 17 or later.
  • Corrupted NuGet package cache for the Microsoft.Android.Sdk workload.

Fix 1: Build from the Command Line

Bypass the IDE entirely to get the actual error message:

dotnet build -f net10.0-android -v detailed

The -v detailed flag produces verbose output that reveals the real error hidden by VS 2026. Look for lines containing error or FAILED.

Fix 2: Verify Java SDK Version

.NET 10 MAUI Android projects require JDK 17 or later. Check your installed version:

java -version

If you see JDK 11 or earlier, download and install the Microsoft Build of OpenJDK 21 from the official Microsoft page. Then set the path in VS 2026 via Tools > Options > Xamarin > Android Settings > Java Development Kit Location.

Fix 3: Clear the NuGet Cache

A corrupted workload cache can cause silent build failures:

dotnet nuget locals all --clear
dotnet workload repair

Then rebuild the project. I've seen this fix issues that nothing else would.

How to Install the Android SDK Manually Outside Visual Studio

When the built-in SDK Manager in VS 2026 is being unreliable, installing the Android SDK manually gives you full control. This approach is also required for CI/CD pipelines and VS Code-based development.

Step 1: Download the Command-Line Tools

Visit the official Android developer site and download the Command line tools only package for your operating system. As of February 2026, the latest version is commandlinetools-win-11076708_latest.zip.

Step 2: Create the SDK Directory Structure

:: Windows
mkdir C:\AndroidSDK
mkdir C:\AndroidSDK\cmdline-tools
mkdir C:\AndroidSDK\cmdline-tools\latest

Extract the downloaded ZIP contents into the latest folder so that sdkmanager.bat is located at C:\AndroidSDK\cmdline-tools\latest\bin\sdkmanager.bat.

Step 3: Install SDK Components

cd C:\AndroidSDK\cmdline-tools\latest\bin

sdkmanager.bat "platforms;android-35" ^
  "build-tools;35.0.0" ^
  "platform-tools" ^
  "emulator" ^
  "system-images;android-35;google_apis;x86_64" ^
  --sdk_root=C:\AndroidSDK

Step 4: Accept Licenses

sdkmanager.bat --licenses --sdk_root=C:\AndroidSDK

Type y for each prompt.

Step 5: Create an AVD

cd C:\AndroidSDK\cmdline-tools\latest\bin

avdmanager.bat create avd -n "Pixel_8_API_35" ^
  -k "system-images;android-35;google_apis;x86_64" ^
  -d "pixel_8"

Step 6: Point Visual Studio to the New SDK

In VS 2026, go to Tools > Options > Xamarin > Android Settings and set the Android SDK Location to C:\AndroidSDK. Also set the environment variables as described earlier. Restart VS and open your MAUI project — the emulator and build targets should now work.

Setting Up Hardware Acceleration for the Android Emulator

Without hardware acceleration, the Android emulator runs orders of magnitude slower. Like, borderline unusable. VS 2026 requires proper hypervisor configuration to deliver usable emulator performance.

Recommended: Hyper-V / Windows Hypervisor Platform (WHPX)

For Windows 10 Pro/Enterprise/Education and all editions of Windows 11, Hyper-V with WHPX is the recommended approach:

  1. Open Control Panel > Programs > Turn Windows features on or off.
  2. Enable Hyper-V (all sub-features) and Windows Hypervisor Platform.
  3. Restart your computer.
  4. Verify in BIOS/UEFI that Intel VT-x or AMD SVM is enabled.

You can verify the configuration with PowerShell:

Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All
Get-WindowsOptionalFeature -Online -FeatureName HypervisorPlatform

Both should show State : Enabled.

Alternative: AEHD (Sunsetting December 2026)

The Android Emulator Hypervisor Driver (AEHD) is an alternative for machines where Hyper-V conflicts with other software (e.g., VirtualBox). However, AEHD will be sunset on December 31, 2026. Plan your transition to WHPX now — don't wait until the last minute.

To install AEHD, open Tools > Android > Android SDK Manager, go to the Tools tab, expand Extras, and install Android Emulator Hypervisor Driver (installer).

Windows Home Users

Hyper-V isn't available on Windows Home editions. You can use AEHD (while it lasts) or the older Intel HAXM. Honestly, consider upgrading to Windows Pro for long-term emulator support — it'll save you headaches down the road.

macOS

On macOS, the Android emulator uses the built-in Hypervisor.Framework. No additional configuration is needed — hardware acceleration works out of the box on both Intel and Apple Silicon Macs.

Choosing the Right System Image

Always select x86_64 (or x86) system images when creating an emulator AVD. ARM-based images won't use hardware acceleration and will run extremely slowly. The only exception is Apple Silicon Macs, where ARM images run natively and are actually the preferred choice.

Using CLI Builds to Bypass Visual Studio IDE Issues

When VS 2026 itself is the problem — and let's be honest, it often is for MAUI Android in early 2026 — building from the command line lets you keep working while waiting for a patch.

Build and Run on Emulator

:: Build the project for Android
dotnet build -f net10.0-android -c Debug

:: Install the APK on a running emulator
dotnet build -f net10.0-android -c Debug -t:Install

:: Build, install, and run in one step
dotnet build -f net10.0-android -c Debug -t:Run

Build a Release APK

dotnet publish -f net10.0-android -c Release

The signed APK will be placed in bin\Release\net10.0-android\publish\.

Attach Visual Studio Debugger After CLI Launch

If you need debugging capabilities without the unreliable F5 workflow, start your app via CLI, then in VS 2026 select Debug > Attach to Process. Choose Android Debugger as the transport and select the running emulator process. This gives you breakpoints and variable inspection while sidestepping the flaky build-deploy pipeline. It's a bit of a workaround, but it works surprisingly well.

Environment Variables and Path Configuration Checklist

A surprising number of VS 2026 MAUI Android issues trace back to environment configuration. Here's the complete list of variables you should verify:

VariablePurposeTypical Windows Value
ANDROID_HOMEPrimary SDK locationC:\Program Files (x86)\Android\android-sdk
ANDROID_SDK_ROOTLegacy SDK location (some tools still use this)Same as ANDROID_HOME
JAVA_HOMEJava Development Kit locationC:\Program Files\Microsoft\jdk-21.0.6-hotspot
PATHMust include platform-tools and cmdline-toolsAppend %ANDROID_HOME%\platform-tools

Verify everything with:

:: Check environment variables
echo %ANDROID_HOME%
echo %JAVA_HOME%

:: Verify SDK tools are accessible
adb --version
java -version

:: Verify SDK installation
"%ANDROID_HOME%\cmdline-tools\latest\bin\sdkmanager.bat" --list_installed

When to Downgrade to Visual Studio 2022 or 2025

If you've exhausted all the fixes above and your team needs a stable MAUI Android development environment today, downgrading is a legitimate option. I know it's not what anyone wants to hear, but sometimes shipping code matters more than using the latest tooling. VS 2026 can be installed side-by-side with VS 2022, so you don't need to uninstall it.

Recommended Approach

  1. Keep VS 2026 installed for non-Android work (.NET 10 web, desktop, iOS on Mac).
  2. Install or keep VS 2022 (17.12+) for MAUI Android development.
  3. If your project targets .NET 10, note that .NET 10 MAUI is officially supported only in VS 2026. You may need to temporarily target .NET 9 for Android while using VS 2022.
  4. Monitor the VS 2026 release notes for patch updates addressing the Android toolchain issues.

This dual-IDE approach lets you keep your .NET 10 projects compiling for non-Android targets while using the proven Android toolchain in VS 2022.

Diagnostic Commands Quick Reference

Keep this cheat sheet handy for troubleshooting any MAUI Android build error in VS 2026:

:: Check installed .NET SDKs and workloads
dotnet --list-sdks
dotnet workload list

:: Repair MAUI workloads
dotnet workload repair

:: Install or update the MAUI workload
dotnet workload install maui

:: Check Android SDK components
"%ANDROID_HOME%\cmdline-tools\latest\bin\sdkmanager.bat" --list_installed

:: Verify emulator hardware acceleration
"%ANDROID_HOME%\emulator\emulator-check.exe" accel

:: Full diagnostic build
dotnet build -f net10.0-android -v diagnostic 2> build-errors.txt

:: Install all Android dependencies for your project
dotnet build -t:InstallAndroidDependencies -f net10.0-android ^
  -p:AndroidSdkDirectory="%ANDROID_HOME%" ^
  -p:AcceptAndroidSDKLicenses=True

Frequently Asked Questions

Why is my MAUI Android emulator not showing in Visual Studio 2026?

This is a confirmed bug in VS 2026 (18.1.x). The Android emulator dropdown only populates when VS runs with administrator privileges. As a workaround, open Tools > Android > Android Device Manager, authenticate with admin credentials, and manually start the emulator. It'll then appear in the non-admin VS instance. Also make sure that net10.0-android is the first entry in your <TargetFrameworks> list.

How do I fix "dotnet MAUI build failed" errors for Android in VS 2026?

First, build from the command line with dotnet build -f net10.0-android -v detailed to see the actual error. The most common causes are missing SDK paths (XA5300), missing API platform (XA5207), or Java version mismatches. Set ANDROID_HOME and JAVA_HOME environment variables, run dotnet build -t:InstallAndroidDependencies to install missing components, and make sure you've got JDK 17 or later installed.

Can I use Visual Studio 2022 and 2026 side by side for MAUI development?

Yes, and honestly a lot of developers are doing exactly that right now. VS 2026 installs side-by-side with VS 2022 without conflicts. Many teams use VS 2022 for stable MAUI Android builds and VS 2026 for non-Android targets or for projects that require .NET 10 features. During VS 2026 installation, you can import workloads from VS 2022 to reduce setup time.

Why does my MAUI build get silently canceled with no error message?

Silent build cancellations in VS 2026 usually indicate an unhandled exception in the Android build targets. Build from the CLI with the -v diagnostic flag to surface the hidden error. Common culprits include incompatible build-tools versions, JDK version mismatches (need JDK 17+), and corrupted NuGet or workload caches. Run dotnet nuget locals all --clear followed by dotnet workload repair to reset the build environment.

Is AEHD still supported for Android emulator hardware acceleration?

AEHD is still functional but will be sunset on December 31, 2026. Microsoft and Google recommend transitioning to Windows Hypervisor Platform (WHPX) via Hyper-V. If you're on Windows Home (where Hyper-V isn't available), plan to upgrade to Windows Pro or use a physical Android device for testing before the AEHD deadline.

About the Author Editorial Team

Our team of expert writers and editors.