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
- The last folder has
- This folder in the middle is more than 2.8M.
- 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
- Do not connect assemblies
- Connect only the assembly of the SDK
- 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