Develop Android apps with Avalonia UI and run them on WSA

Develop Android apps with Avalonia UI and run them on WSA

Windows 11 has introduced the Windows Subsystem for Android, later abbreviated as WSA.
Similar to the Windows Subsystem for Linux, that includes a Linux operative system inside Windows 11, WSA includes an Android system in Windows 11, allowing for example to download Android apps from the Amazon store, or, like in this case, do mobile development directly on our Windows 11 machine.

Installing the Windows Subsystem for Android is very easy:

  • From the Windows Store, search for the Amazon Appstore app and install it:
    Amazon_1
  • Accept the following prompts:
    Amazon_2
  • Open the Amazon Appstore app:
    Amazon_3
  • Here you need to sign with your Amazon account:
    Amazon_4
  • So you will be able to access the Amazon Appstore:
    Amazon_5

It will be possible now to open the Windows Subsystem for Android Settings:
Amazon_6
and enable the Developer Mode:
Amazon_7

Now we can proceed with the Avalonia UI app:

  • Set the Android application as startup project:
    Android_1
  • Install from the Visual Studio Marketplace the Windows Subsystem for Android Barista extension:
    Android_2
  • From the Tools menu, select Windows Subsystem for Android:
    Android_3
  • Approve the request to enable Developer Mode:
    Android_4
  • Allow ADB debugging:
    Android_5
  • Wait that the Windows Subsystem for Android is started:
    Android_6
  • After some time, it will be connected:
    Android_7
  • Now, it will be possible to choose as output device the *Microsoft Corporation Subsystem for Android:
    Android_8
  • Choose the Android project to be deployed, then rebuild the project:
    Android_9

At this point, the Android application will start directly on your Windows 11 machine:
Android_10