Question

Flutter: Google Play Console Warning to use Billing Library version 4 or newer

  • 5 September 2022
  • 3 replies
  • 1515 views

Badge +3

I use the latest version of purchase_flutter (4.2.1) in my Flutter app.

I get an error in the Google Play Console that I have to use Billing Library version 4 or newer. I run the command gradlew “app:dependencies” to check the used version and found this in the result:

+---com.android.billingclient:billig:4.1.0

 

The warning has a link to this site https://developer.android.com/google/play/billing/deprecation-faq with this relevant section:

Make sure your AndroidManifest.xml contains an entry with name com.google.android.play.billingclient.version. If the entry isn't present, check your manifest merge settings to see if the manifest attribute is being dropped during manifest merging.

 

Do I have to set this entry in the AndroidManifest? As I understood, this has to be set by the package purchases_flutter. But why do I get this warning and how I can solve it?

 

 


3 replies

Userlevel 3
Badge +3

`com.google.android.play.billingclient.version` should actually be set by the BillingClient dependency that we depend on. As you mention, purchases_flutter 4.2.1 depends on 4.1.0 already so the warning can be ignored. We have gotten a lot of reports of this, and it looks like it’s a problem with the Play Store itself not being able to recognize the version of the billing client being used.

We have seen cases where an old apk uploaded to a testing or an alpha, beta, etc track can also trigger this warning. Have you checked your uploaded apks? Is it possible you have one uploaded with a dependency on an older version of the BillingClient?

Also, have you checked your merged manifest? Can you see the version there?

Userlevel 3
Badge +3

Also, do you have by any chance any other dependency that’s doing `tools:node="replace”` or are you setting that up manually at all in your AndroidManifest. There is an old issue in the repository talking about this exact same case https://github.com/RevenueCat/purchases-flutter/issues/255#issuecomment-937947386

Badge +3

I checked the merge manifest and it looks good. There is the right version used.

I have older apks uploaded with lower version. Because of that I think I can ignore the warning.

thanks

Reply