本文介绍了Android InApp购买问题(-1002:收到错误响应)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个实施了IAP的应用程序,它在大多数情况下都能正常运行。但是,某些安装报告来自IABHelper的-1002错误代码(未在任何地方记录)。以下是日志告诉我的信息(这是在用户从Google Play返回后发生的):
I have an app with IAP implemented and it works fine for most of the time. However, some installations are reporting a -1002 error code from IABHelper (which is not documented anywhere). Here's what the logs tell me (this happens right after the user returns from Google Play):
2013-05-03 11:40:03,781 774539 [main] ERROR: In-app billing error: Null data in IAB activity result.
2013-05-03 11:40:03,786 774544 [main] DEBUG: Purchase finished: IabResult: Null data in IAB result (response: -1002:Bad response received), purchase: null
2013-05-03 11:40:03,803 774561 [main] ERROR: Error purchasing: IabResult: Null data in IAB result (response: -1002:Bad response received)
为什么会出现错误 -1002
?
Google Play或我的客户端实施存在问题吗?
Is is a problem with Google play or my client implementation?
推荐答案
当应用内结算在一个片段中时,我遇到了同样的问题,我通过将其移动到一个活动来解决它。
I had the same problem when the in-app billing was in a fragment, I solved it solved by moving it to an activity.
这篇关于Android InApp购买问题(-1002:收到错误响应)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!