# Reducing application size

1. APK Split

To optimize your apps final APK size, we strongly recommend using the APK split functionality provided by the Gradle build system. If you are supporting multiple ABIs in your app, then you can split your app APK per ABI and effectively reduce the APK size. Please refer Android developer documentation for more details about ABI APK splits here : <https://developer.android.com/studio/build/configure-apk-splits.html#configure-abi-split>

2\. Declaring only the required architecture: Add ABI filter Trillbit SDK uses native code (.so) files and ships with native code shared object library files for following ABI’s:&#x20;

● armeabi&#x20;

● armeabi-v7a&#x20;

● arm64-v8a&#x20;

● x86&#x20;

● x86\_64&#x20;

As you might not need to support all ABI’s in your app, please add an ABI filter in your app modules build.gradle file. To add an ABI filter, open the build.gradle file for your app module and add ndk abiFilters in android-> defaultConfig section.&#x20;

Eg: If you need to support only armeabi-v7a and x86 architectures, add abiFilters only for these two ABI’s as shown below:

```
android { 
defaultConfig { 
ndk { 
abiFilters "armeabi-v7a", "arm64-v8a" 
} 
} 
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://trillbit.gitbook.io/trillbit-sdk/android-support/trill-sdk-for-android/reducing-application-size.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
