Http://my.oschina.net/u/586684/blog/207844
Http://blog.csdn.net/lilu_leo/article/details/8115612#t1%EF%BC%8C%E5%85%B7%E4%BD%93%E5%81%9A%E6%B3%95%E8%AF%B7%E5%8F%82%E8%80%83%E8%AF%A5%E8%BF%9E%E6%8E%A5%EF%BC%89
Use proguard
Use proguard to Remove useless code and rename some classes, fields, and methods to compact your code and save memory space.
Use zipalign
Zipaligned performs byte alignment on the final packaged APK.
Note: Google Play does not accept unaligned APK.
Http://www.cnblogs.com/xirihanlin/archive/2010/04/12/1710164.html
Analyze memory usage
If a relatively stable version has been obtained, the memory usage of the entire life cycle of the program should be analyzed. Refer to here.
Use multiple processes
If the program needs to execute a lot of background work, you can consider dividing the program into two processes, one process is responsible for the UI, And the other process is responsible for background tasks. For example, a music player.
Sample Code:
<Serviceandroid: Name = ". playbackservice" Android: Process = ": background"/>
The value of the Android: process attribute starts with ":" and the name can be selected at will.
Before deciding whether to use a multi-process, it should be noted that a blank process that does not execute any tasks also occupies at least 1.4 MB of memory.
In addition, pay attention to the mutual dependency of processes. For example, if you place contentprovider In the UI process and the background task process also needs to call contentprovider, the UI process will remain in Ram.
Performance Optimization 2