我在我的应用程序中使用了 android IAB V3。在购买和消费物品后立即查询拥有的物品时,IABHelper 返回我仍然拥有该物品。但是在调用消费时,它会返回该项目不属于自己。我在下面给出我的 logcat 输出。
04-19 15:57:43.668: D/IabHelper(2757): Starting async operation: refresh inventory
04-19 15:57:43.678: D/IabHelper(2757): Querying owned items...
04-19 15:57:43.688: D/IabHelper(2757): Package name: com.games.mygame
04-19 15:57:43.688: D/IabHelper(2757): Calling getPurchases with continuation token: null
04-19 15:57:43.728: D/IabHelper(2757): Owned items response: 0
04-19 15:57:43.758: D/IabHelper(2757): Sku is owned: com.games.pack1
04-19 15:57:43.768: D/IabHelper(2757): Continuation token: null
04-19 15:57:43.768: D/IabHelper(2757): Querying SKU details.
04-19 15:57:43.838: D/IabHelper(2757): Got sku details: SkuDetails:{"title":"Coin Pack 1 (My Game)","price":"Rs. 105.69","type":"inapp","description":"Pack of 50000 coins.","productId":"com.games.pack1"}
04-19 15:57:43.838: D/IabHelper(2757): Ending async operation: refresh inventory
04-19 15:57:46.931: D/IabHelper(2757): Ending async operation:
04-19 15:57:46.931: D/IabHelper(2757): Starting async operation: consume
04-19 15:57:46.931: D/IabHelper(2757): Consuming sku: com.games.pack1, token: wykaaffjpwmehhfdkgmzsbpb.AO-J1OxWZjidethjntgfks3C1tpo6TfiMgWyAc8ycTZWsr7UcaHidKIFRaH-K6L_aa2SYGFc3mq8kLBVajj3mtXQcw8oy8-GAT8aSBLJA_aP3AsnjEKSQ1Ot0OqTBDKJWRduiz
04-19 15:57:47.642: D/IabHelper(2757): Error consuming consuming sku com.games.pack1. 8:Item not owned
04-19 15:57:47.642: D/IabHelper(2757): Ending async operation: consume
我必须等待几分钟才能再次购买此商品。这是因为谷歌播放的本地缓存。有没有人遇到过这个问题。谁能告诉我可能出了什么问题以及如何解决。