Reduce size of APK

Configure APK splits

To reduce size of APK, you can build multiple APKs for specific ABI. For details about multiple APKs, see Build Multiple APKs. The following code snippet in module-level build.gradle file configures multiple APKs based on ABI.

Groovy

1android {
2 ...
3 splits {
4
5 // Configures multiple APKs based on ABI.
6 abi {
7
8 // Enables building multiple APKs per ABI.
9 enable true
10
11 // By default all ABIs are included, so use reset() and include to specify that we only
12 // want APKs for x86, armeabi-v7a, and mips.
13
14 // Resets the list of ABIs that Gradle should create APKs for to none.
15 reset()
16
17 // Specifies a list of ABIs that Gradle should create APKs for.
18 include "x86", "armeabi-v7a"
19
20 // Specifies that we do not want to also generate a universal APK that includes all ABIs.
21 universalApk false
22 }
23 }
24
25}

Min version of the Apryse Android SDK

The min version of the SDK optimizes the Apryse libraries for size using the -Os optimization flag (as described in Options That Control Optimization) reducing the AAR sizes.

You can download the Min version of the Apryse Android SDK from our nightly builds.

Did you find this helpful?

Trial setup questions?

Ask experts on Discord

Need other help?

Contact Support

Pricing or product questions?

Contact Sales