# Updating Google Play Billing to 6.2.1 in Unity

A 2024 workaround using Unity IAP 4.11.0 with a manually replaced Google Play Billing Library AAR.

> In July 2024, I needed to update an app to Google Play Billing Library version 6 before the August 31 deadline described in the original post. Updating Unity IAP to 4.12.0 through Package Manager caused the Android build to fail. Other developers reported the same problem in the forum, and a fix was not yet available in that workflow. I rolled back to 4.11.0 and updated the billing library manually.

## Roll back Unity IAP to 4.11.0

Select version **4.11.0** in Package Manager.

## Download the AAR

Download Billing Library 6.2.1 from [Google's Maven repository](https://maven.google.com/web/index.html?q=billing#com.android.billingclient:billing:6.2.1).

## Replace the AAR

1. Copy `billing:6.2.1.aar` into the Unity project's Assets directory. Unity generates a matching `.meta` file.
2. Search the project for the existing `billing:5.2.1.aar`. Delete it and its adjacent `.meta` file. Move `billing:6.2.1.aar` and `billing:6.2.1.aar.meta` into that directory.

## Update build.gradle

Open `build.gradle` and replace `billing:5.2.1` with `billing:6.2.1`.

That completed the workaround for this project and its 2024 dependency versions.