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

# Build Compatibility

> Which Unity versions and billing packages build with the Encore Unity package, and the one Gradle fix Unity 2022.3 needs on Android.

The Encore Unity package brings the native Android SDK (`com.encorekit:encore`, at the version [Install the SDK](https://docs.encorekit.com/publishers/unity/quickstart/install.md#step-2-add-the-package) names) into your Gradle build, with its own AndroidX and Google Play Billing dependencies. Most projects need nothing extra. This page lists what was measured on 2026-10-29 and what to do where a build fails.

## At a glance

| Setup | Result | What to do |
| - | - | - |
| Unity 2022.3 (2022.3.62f3), Android | Build fails in D8 | Add the [Gradle template fix](#the-d8-crash-on-android) |
| Unity 6.3 (6000.3.27f1), Android | Builds | Nothing beyond the [`Assets/Plugins/Android` folder](https://docs.encorekit.com/publishers/unity/quickstart/install#step-3-platform-setup). The classic Activity and GameActivity both build |
| Unity 2022.3 and 6.3, iOS | Builds | Nothing. The package adds the pod to every target |
| Unity IAP 4.x | Build fails on a manifest merge | [Move to Unity IAP 5.x](#unity-iap) |
| Unity IAP 5.4.4 | Builds | Nothing |
| RevenueCat `purchases-unity` 10.0.0 | Builds | Nothing |

## The D8 crash on Android

Unity 2022.3 builds Android with Android Gradle Plugin 7.4.2. Its D8 crashes with a `NullPointerException` on `androidx.lifecycle:lifecycle-livedata-core:2.8.7`, which the native SDK brings in, and the build fails.

The fix is a newer D8 and R8 for the build, with no change to the Android Gradle Plugin version:

1. Open **Project Settings → Player → Android → Publishing Settings** and turn on **Custom Base Gradle Template**. Unity creates `Assets/Plugins/Android/baseProjectTemplate.gradle`.
2. Add this `buildscript` block at the top of that file, above the `plugins` block:

```groovy theme={null}
buildscript {
    repositories { google() }
    dependencies { classpath 'com.android.tools:r8:8.2.47' }
}
```

Leave the rest of the template as Unity wrote it.

## Unity IAP

Unity IAP 4.11 bundles Google Play Billing 5.2.1 (older 4.x ships older Billing, same conflict), and the native SDK needs Billing 8.0.0. The Android manifest merge fails on the two `com.google.android.play.billingclient.version` values (measured with Unity IAP 4.11.0):

```text theme={null}
Manifest merger failed with multiple errors, see logs
```

Unity IAP 4.x can't be made to work with the package. Move to Unity IAP 5.x first: 5.4.4 builds with it. RevenueCat `purchases-unity` 10.0.0 also builds with it.

A reward placement never runs a purchase, so the package doesn't call your billing stack. The conflict is only about which Billing library the build includes.

## iOS

There is no publisher step. The package lists the `EncoreKit` pod for every target of the exported Xcode project, so the app target embeds the framework the game links.

## Related

* [Install the SDK](https://docs.encorekit.com/publishers/unity/quickstart/install.md)


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