Skip to main content
Solved

Conflict Android Billing Version when migrating old subscription to RC

  • Nov 11, 2021 8:04 AM UTC
  • 2 replies
  • 814 views

Forum|alt.badge.img+6

Hello,

I am using flutter_inapp_purchase to manage in app purchase for my app. Now I migate old subscription that purchase by flutter_inapp_purchase to RC(RevenueCat) via Client Side Migration. But when I run drop release I got some crash:

No virtual method getSku()Ljava/lang/String; in class Lcom/android/billingclient/api/Purchase; or its super classes (declaration of 'com.android.billingclient.api.Purchase' appears in /data/app/~~xCl5ZlazDyYqv4VPMsJnNg==/plant.identification.snap-HZYCA9GF94ar8lvpjvIVmQ==/base.apk)
at com.dooboolab.flutterinapppurchase.AndroidInappPurchasePlugin$7.onPurchasesUpdated(AndroidInappPurchasePlugin.java:98)

I have to use flutter_inapp_purchase to get subscription info then send it to RC. But flutter_inapp_purchase using Google Play Billing Library 3.0 and RC using Google Play Billing Library 4.0 that removed getSku() function.

Do you have solution for this?

Thank you

 

Best answer by cody

Hey @BG37!

I don’t think that those two packages will likely work well together, but you should be able to use an older version of the SDK that used Billing 3.0.0, and try to get it working as you need. I’d recommend moving to the latest version as soon as possible, but since the last Android version supporting Billing Client 3.0.0 was 4.2.1, the last Flutter SDK version supporting it was version 3.3.1: https://github.com/RevenueCat/purchases-flutter/releases/tag/3.3.1

Additionally, if you’re just migrating users over, you should be able to call the `syncPurchases` method which will sync the users previous purchases with RevenueCat, so you don’t need to use your old package.

View original
This post has been closed for comments

2 replies

cody
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • Answer
  • Nov 12, 2021 7:45 PM UTC

Hey @BG37!

I don’t think that those two packages will likely work well together, but you should be able to use an older version of the SDK that used Billing 3.0.0, and try to get it working as you need. I’d recommend moving to the latest version as soon as possible, but since the last Android version supporting Billing Client 3.0.0 was 4.2.1, the last Flutter SDK version supporting it was version 3.3.1: https://github.com/RevenueCat/purchases-flutter/releases/tag/3.3.1

Additionally, if you’re just migrating users over, you should be able to call the `syncPurchases` method which will sync the users previous purchases with RevenueCat, so you don’t need to use your old package.


Forum|alt.badge.img+6
  • Author
  • Member
  • Nov 14, 2021 4:21 PM UTC

Hey @BG37!

I don’t think that those two packages will likely work well together, but you should be able to use an older version of the SDK that used Billing 3.0.0, and try to get it working as you need. I’d recommend moving to the latest version as soon as possible, but since the last Android version supporting Billing Client 3.0.0 was 4.2.1, the last Flutter SDK version supporting it was version 3.3.1: https://github.com/RevenueCat/purchases-flutter/releases/tag/3.3.1

Additionally, if you’re just migrating users over, you should be able to call the `syncPurchases` method which will sync the users previous purchases with RevenueCat, so you don’t need to use your old package.

Hello Thank for your response