Hello
I want to use billing client v4(Google) with purchases_flutter over 3.4.0 and flutter 3.1.1.
but “java.lang.NoSuchMethodError: No virtual method queryPurchases" occured at this code.
await Purchases.setup(publickey);
and stack trace is this.
D/ePurchases] - DEBUG(21733): ℹ️ API request started: GET /subscribers/oDNEWTpax9Xkz0FVC3tdoRzdPbh1/offerings
D/ D/ Purchases] - DEBUG(21733): ℹ️ Requesting products from the store with identifiers: jp.kazushige.sato.suudoku.month1, jp.kazushige.sato.suudoku.month6, jp.kazushige.sato.suudoku.month12
D/.Purchases] - DEBUG(21733): ℹ️ Requesting products from the store with identifiers: jp.kazushige.sato.suudoku.month1, jp.kazushige.sato.suudoku.month6, jp.kazushige.sato.suudoku.month12
D/dPurchases] - DEBUG(21733): ℹ️ Querying purchases
E/AndroidRuntime(21733): FATAL EXCEPTION: Thread-11
E/AndroidRuntime(21733): Process: jp.kazushige.sato.suudoku, PID: 21733
E/AndroidRuntime(21733): 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 'com.android.billingclient.api.BillingClient' appears in /data/app/~~QXhhaysmqhTSoVemfw98mQ==/jp.kazushige.sato.suudoku-JH2QFUYsyY55fD9UUgTEdw==/base.apk)
E/AndroidRuntime(21733): at com.revenuecat.purchases.google.BillingWrapper$queryPurchases$1.invoke(BillingWrapper.kt:383)
E/AndroidRuntime(21733): at com.revenuecat.purchases.google.BillingWrapper$queryPurchases$1.invoke(BillingWrapper.kt:53)
E/AndroidRuntime(21733): at com.revenuecat.purchases.google.BillingWrapper.withConnectedClient(BillingWrapper.kt:593)
E/AndroidRuntime(21733): at com.revenuecat.purchases.google.BillingWrapper.queryPurchases(BillingWrapper.kt:380)
E/AndroidRuntime(21733): at com.revenuecat.purchases.Purchases$updatePendingPurchaseQueue$1.run(Purchases.kt:1707)
E/AndroidRuntime(21733): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
E/AndroidRuntime(21733): at java.util.concurrent.FutureTask.run(FutureTask.java:266)
E/AndroidRuntime(21733): at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
E/AndroidRuntime(21733): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
E/AndroidRuntime(21733): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
E/AndroidRuntime(21733): at java.lang.Thread.run(Thread.java:923)
D/TPurchases] - DEBUG(21733): ℹ️ Products request finished for jp.kazushige.sato.suudoku.month1, jp.kazushige.sato.suudoku.month6, jp.kazushige.sato.suudoku.month12
I/Process (21733): Sending signal. PID: 21733 SIG: 9
Lost connection to device.
method “queryPurchases" is deprecated method at billing client v4.0 but can be used.
and the method is obsolete in v5.0.
Looking at this stack trace, it appears as if the revenuecat library is referencing v5.
If it references v4, why does it raise an exception that the method does not exist?
thanks