search

Home  >  Q&A  >  body text

android - 静态库改如何优化,缩减大小 ?

现在项目里静态库很多总的大概有300M,如何优化这些静态库,缩减可执行文件大小?

高洛峰高洛峰2771 days ago612

reply all(2)I'll reply

  • 黄舟

    黄舟2017-04-18 09:55:25

    Generally speaking, static libraries cannot continue to be optimized. We can only find other alternative solutions to replace static libraries, or optimize in other aspects, such as resource optimization, image, audio and video compression, etc.;

    Your question is not clear. If you are optimizing executable files, it is recommended to use Google's first generation heap. If you are optimizing static libraries, it is recommended to compile and optimize first to avoid compiling multiple architectures, and then find alternative solutions.

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-18 09:55:25

    Static library files can be compressed first, such as into .gz format, and then write a filter class to decompress all .gz format data. Specifically, you can use this jar package directly: https://sourceforge.net /proje...

    reply
    0
  • Cancelreply