Flutter in_app_purchase stuck at queryProductDetails() method(Flutter in_app_purchase 卡在 queryProductDetails() 方法)
问题描述
#in_app_purchase我在我的颤振应用程序中使用 in_app_purchase.https://pub.dev/packages/in_app_purchase首先,我将 RevenueCat 服务用于我的 IAP 服务,但由于无法从 Revenue Cat 购买代币.我决定使用flutter官方的in_app_purchase.当我从 Google Play 查询我的所有产品时,显然采用这种方法.程序卡在
#in_app_purchase I'm using in_app_purchase in my flutter app. https://pub.dev/packages/in_app_purchase Firstly I was using RevenueCat services for my IAP services but due to the unavailability of purchase tokens from Revenue Cat. I decided to use flutter official's in_app_purchase. Apparently in this approach when I query for all my products from Google Play. The program is stuck at
InAppPurchase.instance.queryProductDetails();
方法并且没有给出任何响应.甚至没有错误.我也启动了 InAppPurchase 实例,但它仍然给我带来了问题.有人可以帮忙解决一下吗?
method and isn't giving any response. Not even an error. I have also initiated the InAppPurchase instance but still, it's getting me the issue. Can anybody please help figure this out?
推荐答案
我一直在与同样的问题作斗争,终于找到了解决方案.
I was battling against the same problem and finally found the solution.
这部分需要从应用级别的build.gradle
文件中移除,以便in_app_purchase
正常工作.一旦我删除了这两行,一切都完美无缺.
This part needs to be removed from the app-level build.gradle
file in order for in_app_purchase
to work properly. Once I removed these two lines, everything worked flawlessly.
def billing_version = "4.0.0"
implementation "com.android.billingclient:billing:$billing_version"
这非常具有误导性,因为 in_app_purchase 包链接到 "Getting开始"Google Play 指南,其中明确表示要添加这两行.
This it terribly misleading, since the in_app_purchase package links to the "Getting started" guide for Google Play, which explicitly says to add these two lines.
这篇关于Flutter in_app_purchase 卡在 queryProductDetails() 方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Flutter in_app_purchase 卡在 queryProductDetails() 方法
- 在 Iphone SDK 的导航栏上添加多个按钮 2022-01-01
- UITextView 内容插图 2022-01-01
- 网上有没有好的 UIScrollView 教程? 2022-01-01
- Xcode 7.3 中带有 UILabel 的 UIStackView 2022-01-01
- 类似于 Mail.app 的 iPad 模态视图控制器? 2022-01-01
- 如何在 iPhone 模拟器中重置 NSUserDefaults 数据? 2022-01-01
- URL编码Swift iOS 2022-01-01
- GPS状态的广播接收器? 2022-01-01
- 使用自动布局向 UIScrollView 添加动态大小的视图 2022-01-01
- SetOnItemSelectedListener上的微调程序错误 2022-01-01