# Install MAUI Workload
Install workload
Enable the MAUI workload in dotnet.
dotnet workload install maui
Install Android Dependency using the predefined BuildTarget from .net
Tip
Build target should come with the MAUI project, make sure execute dotnet build in a MAUI project.
dotnet build \
-t:InstallAndroidDependencies \
-p:AndroidSdkDirectory=/_workarea/tools/android-sdk \
-p:JavaSdkDirectory=/_workarea/tools/jdk \
-p:AcceptAndroidSdkLicenses=True
The AndroidSdkDirectory and JavaSdkDirectory should set to the path you want
to install the Android SDK and Java SDK.
Note
The installation can be done by Rider or Visual Studio Installer, this topic is only for clean and seperate
installation path.
Add the Android SDK and Java SDK Paths to the project.
Add to the .cspoj file for the Android SDK and JDK.
<PropertyGroup>
<AndroidSdkDirectory>D:\_workarea\tools\android-sdk</AndroidSdkDirectory>
<JavaSdkDirectory>D:\_workarea\tools\jdk</JavaSdkDirectory>
</PropertyGroup>
Without the path setting in .csproj, you can add arguments to dotnet build.
dotnet build `
-p:AndroidSdkDirectory=D:\\_workarea\\tools\\android-sdk `
-p:JavaSdkDirectory=D:\\_workarea\\tools\\jdk `
.