如何减少包含大小超过100 MB的.so文件的应用程序大小

问题描述 投票:2回答:1

我的应用程序大小已达到100 MB,所以我使用analyze apk工具找出原因,罪魁祸首不是resaar而是.so文件。这些.so文件使用了约49%的应用程序总大小。

enter image description here

enter image description here

我没有在libs文件夹中添加任何这些,但我在项目中添加的其他aar文件正在添加这些.so文件。

这就是我在gradle中添加的内容

 defaultConfig {
        ndk {
            abiFilters "armeabi", "armeabi-v7a", "x86"
        }
 }

如果我从gradle中删除x86,apk的大小急剧减少,但我不确定这是否会破坏任何东西。

我有以下问题;

  1. 是否有必要为.soarmeabi添加x86
  2. Proguard会影响.so文件吗?
  3. 有没有办法删除未使用的.so文件
  4. armeabi-v7ax86文件有什么用?
android performance .so
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.