# MauiProjectResource.AddAndroidEmulator

- Module: [Aspire.Hosting.Maui](/reference/api/go/aspire.hosting.maui.md)
- Defined on: [MauiProjectResource](/reference/api/go/aspire.hosting.maui/mauiprojectresource.md)
- Version: `17.0.0-preview.1.26567.5`
- Kind: `method`

Adds an Android emulator resource to run the MAUI application on an Android emulator with a specific name.

## Remarks

This method creates a new Android emulator platform resource that will run the MAUI application
targeting the Android platform using `dotnet run`. The resource does not auto-start
and must be explicitly started from the dashboard by clicking the start button.
Multiple Android emulator resources can be added to the same MAUI project if needed, each with
a unique name.
This will run the application on an Android emulator. Make sure you have created an Android
Virtual Device (AVD) using Android Studio or `avdmanager`. The emulator should be running
and visible via `adb devices`.
To target a specific emulator, provide the emulator ID (e.g., "Pixel_5_API_33" or "emulator-5554").
Use `adb devices` to list available emulator IDs.

## Definition

```go
type MauiProjectResource interface {
    // ... omitted for brevity
    AddAndroidEmulator(
        name string,
        options ...*AddAndroidEmulatorOptions,
    ) MauiAndroidEmulatorResource
}
```

## Signature

```go
AddAndroidEmulator(
    name string,
    options ...*AddAndroidEmulatorOptions,
) MauiAndroidEmulatorResource
```

## Parameters

- `name` (`string`) -- The name of the Android emulator resource.
- `options` (`...*AddAndroidEmulatorOptions`) -- optional settings, see [Options](#options)

## Options

Optional parameters are passed in a trailing `options ...*AddAndroidEmulatorOptions` argument.

- `EmulatorId` (`*string`) -- Optional emulator ID to target a specific Android emulator. If not specified, uses the currently running emulator or starts the default emulator.

## Returns

[`MauiAndroidEmulatorResource`](/reference/api/go/aspire.hosting.maui/mauiandroidemulatorresource.md) -- The resource builder.

Returns a handle; failures surface later via `Err()`.

## Defined on

- [MauiProjectResource](/reference/api/go/aspire.hosting.maui/mauiprojectresource.md) -- `handle`
