Upgrade the Unity IAP package to Use billing Library 6.+

Hi, Hope everyone doing great!

We are currently facing an issue regarding Unity IAP package, the package uses Google Billing library 5.2.1 in their latest package. The Google Play Store now throwing a Red Warning with a deadline of 1st August to update the Google Billing Library to 6 or newer.

I hope that every other studio that using same Unity IAP package for IAP is looking for the solution. I hope that this post reached out to unity team and they will update the Billing library in their Unity IAP package as soon as possible.

16 Likes

i am facing same issue, can you find the solution?

@Brothers-Studio They have updated the unity package, please check the package manager. 4.12.0

5 Likes

I don’t have this update, Unity version 2022.3.22f1.

I am using 2022.3.12f1 and the latest version of IAP is 4.11.0. Do I need 2023 or is there any way to pull the package from git?

1 Like

Solution here: https://forum.unity.com/threads/how-do-i-use-iap-4-12-0.1598904/

2 Likes

Go to Package-Manager and click on + icon and choose add package by name and add the package name like this com.unity.purchasing and in the version add 4.12.0.
The package will start adding in your project.

6 Likes

Adding the IAP 4.12.0 solves the problem.

If you export the Android project you can see that the billing library 6.2.1 is added in the build.gradle. However this one could also become obsolete soon. The latest version is already 7.0.0. Hope Unity will update to the version 7.x as soon as possible.

By the way, the deadline is 31st August 2024 and you can ask for the extension until 1st November 2024.

2 Likes

This did it for me thank you!!

But after trying to build had gradle and duplicate dependencies issues. Any fix for this?

If anyone want fast and easy visual solution for upgrading google play billing library then see video:

1 Like

Hi @bradleyb222, could you tell about which unity version you are using. and also share the gradle error.

I did this steps and i can see the billing version is 6.2.1. and did a force resolve for the EDMU. Then upload in the play console. But still i can see that red warning in my console. Will this go or still there untill aug end ?

I’m currently using Unity Version 2022.3.28f1
package manager 4.12.2

Warning will not disappear. After uploading new billing library in google console account just wait few hours and google will send you new notification “A recent policy violation in your app has been addressed”.

Hi @ajithkumaran000
I have the same issue. App was released more then 12 hours ago with “com.android.billingclient:billing:6.2.1” , but I still have Red warning.

Do you have any updates from you side? Did it remove?

1 Like

No I Still have that error message in my side

1 Like

I am having the same issue. Have updated unity IAP, have checked that billing version is 6.2.1. Did upload app 3 days ago, but warning still present. More of that, one user reported that when he can not purchase inapp!! It says he is not from eligible country…

2 Likes

Has anyone fixed it ? Still get errors of gradle and java even when all packages are correct.

Followed your approach:

“A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable See the Console for details.”

And then multiple errors in console

  1. " update your project to
    use a newer Android Gradle Plugin that has been tested with compileSdk = 34"
  2. Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:launcher:checkReleaseDuplicateClasses’.

See the following discussion link. It fixed it for me. I was able to successfully build.

Do what @unity_psBBuKYnBt2RIg and @Alkanov had posted there. I did both of what they recommended. I had to delete the “Library” folder too (when restarting Unity, the Library folder will be rebuilt)

https://discussions.unity.com/t/after-updating-iap-to-4-12-2-an-error-occurs-in-android-build/1502616/15