最近更新了cocos到最新的2.4.8,同时更新Android Studio 版本到4.2.并且更新了grade版本。在项目不变的情况下打出的apk包变大了几乎1倍。期初以为是引擎版本问题,最后网络查了各种资料发现是AS的设置问题。 会导致so文件不会被压缩。
解决方案: AndroidManifest.xml 增加配置 android:extractNativeLibs=“true”
示例如下:
<application
android:allowBackup=“true”
android:label="@string/app_name"
android:extractNativeLibs="true"