Solved

Conflict Android Billing Version when migrating old subscription to RC

  • 11 November 2021
  • 2 replies
  • 362 views

Badge +5

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

 

icon

Best answer by cody 12 November 2021, 20:45

View original

2 replies

Userlevel 6
Badge +8

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.

Badge +5

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

Reply