> For the complete documentation index, see [llms.txt](https://docs.payments.thalescloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payments.thalescloud.io/nfc-wallet-sdk-android/get-started/configuration/1.-binary-integration/build-multiple-apks.md).

# Build multiple APKs

## Overview

To reduce APK size, generate one APK per CPU architecture (ABI).

For background, see Android’s documentation on APK splits:\
<https://developer.android.com/build/configure-apk-splits>

NFC Wallet SDK supports these ABIs:

* `armeabi-v7a` (32-bit)
* `arm64-v8a` (64-bit)

When you enable ABI splits, Gradle generates one APK per ABI for your **digital wallet application**.

The following figure illustrates the building of APK for 32-bit and 64-bit architectures.

<figure><img src="/files/GzjjwcUNcQNCS1Xgv2J7" alt="Overview of splits for architecture"><figcaption><p>Overview of splits for architectures</p></figcaption></figure>

{% hint style="info" %}

## Size consideration <a href="#size-considerationbr" id="size-considerationbr"></a>

The SDK AAR contains native `.so` libraries for all supported ABIs.

* Universal AAR size = size(`armeabi-v7a` `.so`) + size(`arm64-v8a` `.so`)
* With ABI splits, each generated APK contains only one `.so`
* 32-bit APK size ≈ size(`armeabi-v7a` `.so`) + other application components
  {% endhint %}

## Configure your build for multiple APKs <a href="#configure-split" id="configure-split"></a>

In your app module build file:

* Enable ABI splits so Gradle generates one APK per ABI.
* Expect APK names like `appname-abi-buildType.apk` (for example, `mpa-arm64-v8a-debug.apk`).
* If you publish multiple APKs, assign a unique `versionCode` per APK before uploading to Google Play.\
  See: <https://developer.android.com/studio/build/configure-apk-splits#configure-APK-versions>

{% tabs %}
{% tab title="Groovy (build.gradle)" %}
{% code title="app/build.gradle" %}

```groovy
android {
    splits {
        // Generate one APK per ABI.
        abi {
            enable true
            reset()
            include "armeabi-v7a", "arm64-v8a"

            // Do not generate a universal APK containing all ABIs.
            universalApk false
        }
    }
}
```

{% endcode %}
{% endtab %}

{% tab title="Kotlin (build.gradle.kts)" %}
{% code title="app/build.gradle.kts" %}

```kotlin
android {
    splits {
        abi {
            isEnable = true
            reset()
            include("armeabi-v7a", "arm64-v8a")
            isUniversalApk = false
        }
    }
}
```

{% endcode %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.payments.thalescloud.io/nfc-wallet-sdk-android/get-started/configuration/1.-binary-integration/build-multiple-apks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
