How is source code compiled with MAUI to run on Android devices?

322 views Asked by At

suppose I have written an app for an Android platform using MAUI, is the existence of CoreCLR runtime on the phone a requirement for the execution of the app? Is there any AOT compilation scenario for the Android app?

1

There are 1 answers

0
Guangyu Bai - MSFT On BEST ANSWER

The compilation process involves the following steps:

First, the C# code is compiled into Intermediate Language (IL) by the C# compiler.

Second, the IL code is then converted into native code for the target platform by using the Mono Ahead-of-Time (AOT) compiler or the .NET Native compiler.

Last, the native code is then packaged into an APK or AAB file by using the Android SDK tools.

Is there any AOT compilation scenario for the Android app?

You can check this thread [android] add AOT profile for .NET MAUI #2496 to use the AOT compilation.