You can decide to deploy to one or more of the platforms based on your development environment. You just ran and deployed your app to Windows. Now, let's set up an Android device or emulator.
From the debug drop down menu, select net6.0-android under Framework.
Specific versions of the Android SDK are required to build projects. If you haven't accepted the Android SDK license, you'll see the following error message on the Error List window.
Double click the message to start the license acceptance process. Click Accept for each of the licenses present and the automatic installation will begin.
If you don't have an Android device to deploy to, you can set up an Android emulator. If you've already done this, you can skip this step.
If this if your first time building a .NET MAUI application, you'll see "Android Emulator" in the debug menu. Click it to start the creation process.
This brings up a User Account Control prompt. Select the Yes button and the emulator creation process will start. Select the Create button to create an emulator with default settings.
At this point, you may be prompted to agree to the license agreement for the Android emulator. Read through and select Accept to continue the process. This will download the emulator images and finalize the creation of the emulator for use in Visual Studio.
Once the emulator has been created, you'll see a button that says Start. Click it.
You may receive prompt to enable Windows Hypervisor Platform. Follow the documentation to enable acceleration to improve performance (strongly recommended).
The Android emulator will launch. Wait for it to fully finish starting and you'll see it displayed in the Visual Studio debug menu. This may take some time.
Your Android emulator has now been created and is ready to use. Next time you run Visual Studio, the emulator will appear directly in the debug target window and will start when you select it. If you ran into any issues or have performance issues with the emulator, read through the full setup documentation.
To develop with your Android device, USB debugging needs to be enabled. Follow these steps on the device to connect it to Visual Studio. If you don't have an Android device, you can skip this section.
Enable developer mode
Check USB debugging status
Your device is now configured and will show up in Visual Studio as a deployment target.
Having issues? Check the documentation.
Your emulator or device should now be configured for deployment!
Make sure your device or emulator is selected as a debug target.
From the menu, select Debug > Start Debugging (or press F5). If this option is disabled, ensure an emulator or device is selected.
Your application will build, deploy to the Android device/emulator selected, and run.