Debug and Release Version have different file Size, but in negative way: Maui Android App

Sumit Gupta 46 Reputation points
2024-05-17T11:30:03.5166667+00:00

I had a Xamarin App that when I compile goes to 30 MB file size in release after all optimization. Now, we uprade same app to Maui. And when I run the app in emulator it works fine with APK been generate of 20 MB. During Xamarin since link is not set and compression was not there APK used to be 40 MB or something.
Now when I try to publish it with Trimming on and Link is set for size optimization our generated APK is 60 MB. It is double the size we have for exactly same app from Xamarin on play store.

How and what change here to increase size this much.. even debug version is 20 MB only. So why APK for release is so high ?

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,015 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 58,356 Reputation points
    2024-05-17T15:54:19.4166667+00:00

    unlike the debug version which targets the simulator platform, the release needs a binary for every android platform type (hardware) your code supports.