Skip to main content

Adapty_v3.17.2: ERROR: Failed resolution of: Lcom/android/billingclient/api/QueryPurchaseHistoryParams;

Adapty_v3.17.2: ERROR: Failed resolution of: Lcom/android/billingclient/api/QueryPurchaseHistoryParams;

An error occurs during initialization.
Android
Adapty 1.17.2
Unity 6000.5.9f1
In-App Purchasing 5.4.2
As far as I understand, Adapty 1.17.2 accesses the Google Play Billing API at startup, which is no longer available in Billing Library 7+ (the QueryPurchaseHistoryParams class has been removed).

How to fix it?

1 comment

Comments1

  • Ebrar Berenay Yiğit

    Team•

    Aug 26

    Hi, this is Berenay from Adapty Support Team.

    Thanks for the detailed report — your diagnosis is on the right track.

    The Adapty_v3.17.2 tag is the native Android SDK version bundled with Adapty Unity plugin 3.17.0 (the plugin and native versions differ). That native SDK is built against Google Play Billing Library 7, where QueryPurchaseHistoryParams still exists. Unity In-App Purchasing 5.4.2 brings Billing Library 8, Gradle resolves to the higher version, and BL 8 removed that class — hence the resolution error.

    The important part: this comes from the purchase-history sync path only. The Adapty SDK detects Billing Library 8 at runtime and skips that call, because BL 8 no longer supports querying purchase history. Adapty has been compatible with BL 8 since native SDK 3.15 — initialization completes, and fetching paywalls and making purchases are not affected. What you're seeing is that path logging a resolution failure instead of staying quiet.

    Two ways forward:

    Recommended — wait for the Unity plugin release that pins native Android SDK 4.0.2 or newer. In 4.0.2 the purchase-history call was removed entirely, the SDK is built against Billing Library 8, and it is compatible with Billing Library 9. Currently no Unity plugin release includes it, so this needs an upcoming plugin update.

    If you want the log clean now — pin Billing Library 7 in Assets/Plugins/Android/mainTemplate.gradle:

    configurations.all {

    resolutionStrategy {

    force 'com.android.billingclient:billing:7.1.1'

    }

    }

    Only do this if Unity IAP 5.4.2 works with BL 7 in your project — test your purchase flows afterwards. Also note Google's deadline for Billing Library upgrades, so treat this as a temporary measure rather than a long-term pin.

    One thing worth verifying on your side: with Billing Library 8 in place, check that restoring purchases behaves as expected on a device with an active subscription. If you see anything off there, let us know with the logs.

    If you'd like us to look at your specific setup, or you need a timeline for the Unity plugin update, reach out to support@adapty.io and we'll pick it up directly.