Skip to main content
Solved

Conflict Android Billing Version when migrating old subscription to RC

  • 11 November 2021
  • 2 replies
  • 383 views

Forum|alt.badge.img+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

 

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
Did this post help you find an answer to your question?

2 replies

cody
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • 492 replies
  • Answer
  • November 12, 2021

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+5
  • Author
  • Member
  • 9 replies
  • November 14, 2021
cody wrote:

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings