O'Reilly logo

Xamarin Mobile Development for Android Cookbook by Matthew Leibowitz

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Shrinking the app package

No app uses all the features of all the included libraries. The .NET libraries are quite big, and we often only use a tiny subset. To reduce the size of an app, we need to remove any unnecessary code or libraries that exist in it.

How to do it...

To reduce the overall size of the app, we enable the linker. This is used to remove any unused code from our app, or from any assemblies that are used:

  1. We select either the Link SDK assemblies only option or the Link all assemblies option from the Linker behavior dropdown:
    How to do it...

    The linker options

  2. When we link assemblies, types and members are removed. To prevent members from being removed, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required