Forum Discussion
SampsonYe
Nov 23, 2021Copper Contributor
How to build MAUI to apk?
i try publish,it can not work
- Nov 24, 2021
Using the dotnet cli you can build an apk using the following command:
dotnet build -f net6.0-android
The apk file will be built, and you can find it at <app-root-dir>/bin/release/net6.0-android/com.companyname.appname-Signed.apk
Anna_Doll
Jan 09, 2025Copper Contributor
To build a .NET MAUI app into an APK, follow these steps:
- Use the Command: Run this in your project directory:bashdotnet build -f:net6.0-android -c:Release
- Locate the APK: Find the APK at:bash<project-root>/bin/Release/net6.0-android/com.companyname.appname-Signed.ap
- Optional Signing: For production, configure signing in your .csproj or manually sign the APK.
This will generate a ready-to-deploy APK.