How To Set Up an Android Dev Environment
This guide shows you how to set up your development environment for work on a mobile Android application.
Follow these steps to install the tools you will need, using the CLI:
- Check that you have installed a compatible version of the .NET SDK. The lowest version that works with Avalonia UI is 6.0.2.00.
You can see the versions of the .NET SDK here.
- You may need to uninstall an old version of the Android Workload. To do this, type the following command:
dotnet workload remove android
- Install the Android Workload. To do this, type the following command:
dotnet workload install android
You may need to run the above commands with sudo.
Install the Android SDK
There are several ways to install the Android SDK. Choose the one that matches your development environment.
If you have Visual Studio or Visual Studio for Mac then follow the guide found here:
{% embed url="https://docs.microsoft.com/en-us/xamarin/android/get-started/installation/android-sdk" %}
If you use JetBrains Rider then follow the guide here:
{% embed url="https://www.jetbrains.com/help/rider/Xamarin.html" %}
Alternatively you can install the Android command line tools from here:
{% embed url="https://developer.android.com/studio#command-tools" %}
This toolset has a command line based SDK manager that can be used to install the SDK.
There is also a tool in development called MAUI Check that can install all the required SDKs and tools for you automatically:
dotnet tool install -g Redth.Net.Maui.Check
maui-check
With the above Android development environment setup, you will be able to build Android applications, and run them in a simulator on your platform.