应用内结算测试:android.test.purchased已拥有 [英] In-App Billing test: android.test.purchased already owned

查看:98
本文介绍了应用内结算测试:android.test.purchased已拥有的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在为未来的应用测试应用内结算,并且在我第一次成功购买"测试项目"android.test.purchased"之后,每次尝试购买时,我现在都会收到响应代码7再次,这意味着我已经拥有此项目.

I am currently testing In-App Billing for a future app, and after I successfully "bought" the test item "android.test.purchased" the first time, I now receive the response code 7 every time I try to buy it again, which means that I already own this item.

12-15 23:02:14.149:E/IabHelper(19829):应用内结算错误:无法 购买商品,错误响应:7:商品已经拥有

12-15 23:02:14.149: E/IabHelper(19829): In-app billing error: Unable to buy item, Error response: 7:Item Already Owned

据我了解,这次购买应该总是可能的,对吧?以便开发人员可以测试他/她的应用程序?

From what I understand, this purchase is supposed to always be possible, right? So that the developer can test his/her app?

如果没有,如何将其状态重置"为不拥有?我正在使用Google应用内结算示例中的util软件包.

If not, how can I "reset" its state to not owned? I am using the util package from the Google In-App Billing Sample.

推荐答案

事实证明android.test.purchased项目的行为类似于常规ID.这意味着,如果您想再次购买它,则必须在代码中的某处使用它.我认为Google文档在此问题上具有误导性,他们应该添加另一个可以永久用于测试目的的静态ID.

It turns out that the android.test.purchased item behaves like a regular ID. It means that if you want be able to buy it again, you have to consume it somewhere in your code. I think that the Google documentation is misleading on this matter, and that they should add another static ID that you can buy endlessly for test purposes.

这篇关于应用内结算测试:android.test.purchased已拥有的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆