logo
On this page

Why does the APK package size increase after setting Android minSdkVersion to 23?

2022-10-20
Products / Plugins:Video Call / Audio Call / Live streaming / Interactive whiteboard / File sharing / AI Effects / GO Class / In-app chat / Super Board / Live streaming
Platform / Framework:Android

This is because when minSdkVersion is 23 or higher, AGP (Android Gradle Plugin) will no longer compress the so files in the APK by default, so the packaged APK will be larger. For specific reasons, refer to the "Detailed Description" section below.

However, developers need not worry about the download size of the package increasing after uploading to the app store, because app stores generally use compression patches to compress the uploaded APK again.

Detailed Description

Android 23 and above can read so files directly from the APK without extracting them. Therefore, if the API level (corresponding to minSdkVersion) is 23 or higher, AGP will no longer compress the so files in the APK by default.

Note

If minSdkVersion is 23 or higher and the developer has not manually set android

="true", the system will automatically inject android
="false" in the manifest.

The android

setting determines whether the package installer extracts native libraries from the APK to the file system. If set to "false", native libraries must remain page-aligned and stored uncompressed in the APK. No code changes are needed because the linker will load the libraries directly from the APK at runtime.

For details about android

, refer to the official documentation.

This means that although the APK size will increase, the actual installed application size is actually smaller:

  • When API < 23, the installed application includes compressed so files and decompressed so copies extracted from the APK.
  • When API >= 23 and android
    ="false", the installed application only includes uncompressed so files without extracted so copies.

Previous

When calling the createEngine interface to create an engine, if the room scenario is set to "voice call/voice chat room/KTV" and other scenarios, do I still need to actively call the "enableCamera" interface to close the camera?

Next

When pushing stream on Web end, error "code: 1103065, msg: Not Readable Error: device is not readable" is reported. How to handle?

On this page

Back to top