Size Of App 100MB

Hello everyone,

I'm running into a snag while trying to generate an APK for my app. Currently, the APK's size stands at a hefty 100MB, which is far larger than I'd like it to be.

In an effort to address this, I adjusted the <EmbedAssembliesIntoApk> setting to False in my project file. However, this modification led to a failed publish process.

Visual Studio 2022 has highlighted that Fast Deployments are enabled for my app, indicating a potential conflict with the changes I've made.

Could someone offer guidance or assistance in resolving this issue? I'm open to any suggestions or insights. Thanks in advance for your help!


5 Replies

BV Brundha Velusamy Syncfusion Team May 14, 2024 06:59 AM UTC

Hi Felipe,

 

Here are some suggestions to reduce the size of your APK:

 

  • Optimize resources within your app, such as images, audio files, and other assets.
  • Utilize tools like ProGuard (for Android) to eliminate unused code and resources, which can help decrease the overall size of your APK.
  • Consider transitioning to Android App Bundles. This allows Google Play to generate optimized APKs for each device configuration, reducing the size of the APK delivered to users while still providing all necessary resources.

 

Regards,

Brundha V



FS Felipe Sotelo replied to Brundha Velusamy May 16, 2024 06:09 PM UTC

Hello! Brundha

I'm working with VS2022 and I'm really having trouble because I can't find any option to reduce the size.

For example, I put false in the option to not reference all assemblies, the size is 17 MB.

I don't understand why it's so difficult.

Could you give me more information and give me, for example, a video or tutorial that I can follow?


Sincerely


Felipe



PI Prithis Iyyappan Syncfusion Team May 17, 2024 02:05 PM UTC

Hi Felipe Sotelo,

 

We have investigated your query on " I can't find any option to reduce the size of the Application". We suggest you disable the AOT [Ahead-Of-Time] compilation in your project, which will help you reduce the size of your generated APK. Please refer to the attached video for more details on how to disable the AOT compilation in your project.

 

Please let us know whether our suggestion meets your requirements. Please do not hesitate to contact us if you have any concerns or queries.

 

Regards,

Prithis I.


Attachment: How_to_disable_AOT_d3cb12ce.zip


FS Felipe Sotelo replied to Prithis Iyyappan May 17, 2024 04:18 PM UTC

Hi Prithis Iyyappan,I reviewed your suggestion and realized that I hadn't checked the AOT configuration.I tried a method, but encountered a problem.I use Firebase libraries for login in my app.When I set Publish Trimmed with the Link configuration, the APK size reduces from 100MB to 70MB.However, the Firebase libraries stop working correctly, and some documents mention that Firebase cannot be trimmed.So, I tried separating the login module and removing the Firebase libraries from the root app. Then, I added a new class library and set the property IsTrimmable to False in the config file.Unfortunately, this didn't work. I'm not sure what else I can do.



PI Prithis Iyyappan Syncfusion Team May 22, 2024 02:17 PM UTC

Hi Felipe Sotelo,

 

Since the issue you are facing is with Firebase libraries, Can you please try raising a query in the public forums or .NET MAUI discussion community that we have shared below.

 

MAUI Discussions link:  https://github.com/dotnet/maui/discussions

 

Regards,

Prithis I.


Loader.
Up arrow icon