Using Google Play Billing Library 5.0.0 with purchases_flutter 3.10.0

Badge +5

I use on my application and purchases_flutter 3.10.0 for the revenuecat subscriptions.

From May 2022, users can't see the free trial or intro price options. Then, I messaged the GooglePlay and they replied as below:

Hello Google Play Developer, Due to a bug in our system, since May 3, 2022, you may be experiencing incorrect or missing subscription information in the results from the Google Play Billing library’s deprecated querySkuDetailsAsync() function. During this time the Google Play Billing library may not have returned information to your apps about free trial and intro price offers for one or more of your subscriptions, even if the user was eligible for these offers. In these cases, users only saw the subscription base plan in the purchase cart, without any free trials or intro prices.

Action Required

We recommend that you review all of your subscriptions with free trial and intro price offers in the Play Console, and ensure that the correct offers are active and marked as backward compatible. You can learn more about backwards compatibility here.

If your app uses the queryProductDetailsAsync() function instead, this is not impacted and you do not need to take any action.


Then, I wanted to try migrate blling library from 4.0.0 to 5.0.0. However, after the migration, I got the following error and app crashed.

E/AndroidRuntime( 4198): java.lang.NoSuchMethodError: No virtual method queryPurchases(Ljava/lang/String;)Lcom/android/billingclient/api/Purchase$PurchasesResult; in class Lcom/android/billingclient/api/BillingClient; or its super classes (declaration of ''

Could anyone help with the solution?


Best answer by tina 18 July 2022, 18:47

View original

27 replies

Userlevel 3
Badge +6

@Patrick we have released a beta version of `purchases_flutter` that supports Billing Client 5. Here’s the link if you want to try it -

Badge +1

Im using flutter and just upgrade from flutter_purchase 4.11.1 → 5.5.0 and I’m getting a

PlatformException(2, There was a problem with the store., {code: 2, message: There was a problem with the store., readableErrorCode: StoreProblemError, readable_error_code: StoreProblemError, underlyingErrorMessage: Error when fetching products. DebugMessage: An internal error occurred.. ErrorCode: SERVICE_UNAVAILABLE.}, null)

When I call await Purchases.getOfferings().

Was working perfectly fine until I upgraded. I only have 1 time purchases configured no subscriptions so as I understand it the google migration stuff doesn’t apply to me. Do I need to add some new config setting in in androidmanifest.xml or something to support billiing 5.0?