Mono for Android Deep dive APK package structure

Source: Internet
Author: User

Mono for Android first, the approximate compilation structure of mono

First folder (assemblies) Second folder

Here is a very important thing, is Mono's virtual machine, you can open to see, is the so end of the file, this is a C + + written virtual machine, this virtual machine is about 2.8M. Additional references to third-party libraries, including. So. jar packages are all inside.

A third--resources


including pictures, layout, etc.

What's more than native Java development

    1. The last folder has
    2. This folder in the middle is more than 2.8M.
    3. The first folder (mainly this one) is a bit more sprinkled

These assemblies of the first folder are obviously not used, and only a small subset of class libraries (small classes in class libraries) are used. However, the default will be compiled, so the process of mono development is very large.

How to build a thin body for apk

Compilation method

    1. Do not connect assemblies
    2. Connect only the assembly of the SDK
    3. Link so the assembly

What do you mean? It's--the first kind of whatever, if you quote the assembly, you hit it all. The second kind of IDE looks for links, which refers to automatic compilation, excludes unused classes, but excludes the SDK.
The third is to exclude class libraries that are not used in all assemblies.

Note: For serialization and the underlying use of serialization, the link cannot be found and may be excluded from the use of the class, resulting in the program not being used.

Workaround:

You can exclude assemblies that you do not want to link.

What effect does thin body have?

I did not lose weight before, is a--30m program, thin behind only 7M, or add virtual machine 2.8M.

This article only notes: 2015.7.29 change
You are welcome to help me correct

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Mono for Android Deep dive APK package structure

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.