Google 播放 Billing Library 5.0 弃用警告

Google Play Billing Library 5.0 deprecation warnings

自从我将 BillingClient 升级到版本 5.0.0:

googleImplementation 'com.android.billingclient:billing:5.0.0'

我收到了这些独特的弃用警告:

warning: [deprecation] getSkus() in Purchase has been deprecated
warning: [deprecation] getSkus() in PurchaseHistoryRecord has been deprecated
warning: [deprecation] SkuType in BillingClient has been deprecated
warning: [deprecation] SkuDetailsResponseListener in com.android.billingclient.api has been deprecated
warning: [deprecation] SkuDetailsParams in com.android.billingclient.api has been deprecated
warning: [deprecation] SkuDetails in com.android.billingclient.api has been deprecated
warning: [deprecation] querySkuDetailsAsync(SkuDetailsParams,SkuDetailsResponseListener) in BillingClient has been deprecated
warning: [deprecation] setSkuDetails(SkuDetails) in Builder has been deprecated

例如。 documentation suggests to use ProductDetailsResponseListener 代替。

想问一下,怎么用?

SkuDetailsResponseListenerProductDetailsResponseListener 以及其他方法和回调替换,因为 v5 添加了新的订阅功能(根据文档)。

您可以在此处查看完整的迁移指南:
https://developer.android.com/google/play/billing/migrate-gpblv5