> ## Documentation Index
> Fetch the complete documentation index at: https://primer.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Android installation

> [!NOTE]
>
> If you're looking for information on how to integrate the SDK, check out our
>
> [Universal Checkout](https://primer.io/docs/checkout/overview.md) integration guide.

## Install the SDK

We recommend installing the SDK through the Primer BOM (`io.primer:bom`). The BOM sets the version of the SDK and of every Primer library you add, so you only set one version.

Add the following to your app module's `build.gradle.kts` or `build.gradle` file, replacing `<version>` with the latest version from the [Android SDK changelog](https://primer.io/docs/changelogs/android-sdk.md):

```kotlin Kotlin theme={"dark"}
repositories {
    mavenCentral()
}

dependencies {
    implementation(platform("io.primer:bom:<version>"))
    implementation("io.primer:android")
}
```

```groovy Groovy theme={"dark"}
repositories {
    mavenCentral()
}

dependencies {
    implementation platform('io.primer:bom:<version>')
    implementation 'io.primer:android'
}
```

It is highly recommended adding the following settings to your `app/build.gradle` file:

```kotlin KOTLIN theme={"dark"}
android {
    kotlinOptions {
        freeCompilerArgs += '-Xjvm-default=all'
    }
}
```

## Version alignment

Some payment methods and features, such as Klarna and 3D Secure, need a separate Primer library. The integration guide for each one shows the library to add.

Add these libraries without a version. The BOM sets them to the same version as the SDK:

```kotlin Kotlin theme={"dark"}
dependencies {
    implementation(platform("io.primer:bom:<version>"))
    implementation("io.primer:android")
    implementation("io.primer:klarna-android")
}
```

```groovy Groovy theme={"dark"}
dependencies {
    implementation platform('io.primer:bom:<version>')
    implementation 'io.primer:android'
    implementation 'io.primer:klarna-android'
}
```

From SDK 2.54.0, the SDK and each Primer library also depend on the BOM, so Gradle aligns them to the highest Primer version in your build even if you don't declare the BOM yourself. A library version you pinned to an older release is upgraded.

Before SDK 2.54.0, Primer libraries had their own version numbers. Use the BOM, available from SDK 2.37.1, or check the [Android SDK changelog](https://primer.io/docs/changelogs/android-sdk.md) for the library version that matches your SDK.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.