Forum Xamarin.Android
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Assemblies in the APK

I'd like to check my understanding of the APK file contents is correct.

  • The assemblies in \assemblies are JIT compiled and converted into native machine code at runtime.
  • Fast deploy removes the need to redeploy all assemblies each time, by keeping them outside of the APK, and as such is only for debugging
  • classes.dex contains java byte code that supports the assemblies.

The presence of the EmbedAssembliesIntoApk, and the fact that my app still worked (in debug, because fast deploy kicked in) when I disabled this, got me thinking classes.dex actually contained all the code and the assemblies weren't required, at least for a while.

Our Android package is much larger than our iOS one. 13MB & 6MB respectively. Presumably iOS packages are typically smaller because they're compiled down to native code on iOS?

Without assemblies our package is about 5MB. When looking at the APK in 7zip, I notice the assemblies are not compressed. Is this intentional?




  • I have uncompressed assemblies (dlls) along with resources.arsc in Release .apk too (which take ~9 MB).
    Everything else is compressed.
    My apk file is about 13 MB. When I put apk file to zip archive it becomes 5 MB which is MUCH less.

    So, why dlls are uncompressed?

    7z.png 18.7K
Sign In or Register to comment.