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
apkthrills
Jul 23, 2023Copper Contributor
Open a command prompt and navigate to the directory where your MAUI project is located.
Run the following command:
dotnet publish -c Release -r Android -p:PackageFormat=Apk
This will create an APK file in the bin\Release\Android\ directory of your project.
Here is a more detailed explanation of the steps:
The dotnet publish command is used to build a .NET MAUI app.
The -c Release option specifies that the app should be built in release mode.
The -r Android option specifies that the app should be built for Android.
The -p:PackageFormat=<a href="https://apkthrills.com/zombie-tsunami-mod-apk/">Apk</a> option specifies that the app should be packaged as an APK file.
I hope this helps!
Run the following command:
dotnet publish -c Release -r Android -p:PackageFormat=Apk
This will create an APK file in the bin\Release\Android\ directory of your project.
Here is a more detailed explanation of the steps:
The dotnet publish command is used to build a .NET MAUI app.
The -c Release option specifies that the app should be built in release mode.
The -r Android option specifies that the app should be built for Android.
The -p:PackageFormat=<a href="https://apkthrills.com/zombie-tsunami-mod-apk/">Apk</a> option specifies that the app should be packaged as an APK file.
I hope this helps!