谷歌播放应用程序内购买返回错误code -1008:空puchaseData或dataSignature [英] Google Play In-App Purchase returns error code -1008: null puchaseData or dataSignature

查看:3530
本文介绍了谷歌播放应用程序内购买返回错误code -1008:空puchaseData或dataSignature的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图实现谷歌播放应用程序内购买V3 ,在成功实现它在V2。然而,每一次我试图购买我真正的在应用程序的产品之一,我收到下面的后续错误:

I am attempting to implement Google Play in-app purchase v3, after successfully implementing it in v2. However, every single time I attempt to purchase one of my real in-app products, I receive the following follow-up error:

IAB返回null购买数据或dataSignature(响应-1008:未知的错误)

IAB returned null purchaseData or dataSignature (response -1008:Unknown error)

这是从<一个未来href="https://$c$c.google.com/p/marketbilling/source/browse/v3/src/com/example/android/trivialdrivesample/util/IabHelper.java?r=5f6b7abfd0534acd5bfc7c14436f4500c99e0358#452">IabHelper.java类线452 :

if (purchaseData == null || dataSignature == null) {
    logError("BUG: either purchaseData or dataSignature is null.");
    logDebug("Extras: " + data.getExtras().toString());
    result = new IabResult(IABHELPER_UNKNOWN_ERROR, "IAB returned null purchaseData or dataSignature");
    if (mPurchaseListener != null) mPurchaseListener.onIabPurchaseFinished(result, null);
    return true;
}

我已经验证了一个)我的应用程序进行签名,B)​​我的应用程序的版本匹配在谷歌Play商店的草案版本号,以及c)试图购买用户已被添加为测试用户。我曾尝试在3个测试帐号和4应用程序内购买订阅类型。

I have verified that a) my app is signed, b) the version of my app matches the draft version # on the Google Play store, and c) the user attempting the purchase has been added as a test user. I have tried this across 3 test accounts and 4 in-app purchase subscription types.

  • 我要关心这个错误code?
  • 这是仅限于非生产排放的一个问题?
  • 这会影响我的客户在现场,如果/当我发布这个版本?
  • 你真的只考在应用程序内购买的端至端一旦你真正公布其生活与IAB第3版?我知道我可以使用android.test.purchased项目类型,我有(它的工作原理),但我不认为这是一个有效的终端到终端的测试。

推荐答案

我有这个问题我自己。过了一会儿,我发现我做错了什么。我呼吁IABHelper错误的方法。

I had this problem myself. After a while I found what I did wrong. I was calling the wrong method on the IABHelper.

如果你调用 mHelper.launchPurchaseFlow(...)与被注册为在谷歌开发者控制台订阅它会导致错误的SKU: IAB返回null购买数据或dataSignature(响应-1008:未知的错误)。

If you call mHelper.launchPurchaseFlow(...) with an SKU that is registered as a subscription on Google Developer Console it will result in the error: IAB returned null purchaseData or dataSignature (response -1008:Unknown error).

如果您有注册,你必须使用方法的认购一个SKU: mHelper.launchSubscriptionPurchaseFlow(...)而不是

If you have a SKU that is registered as an subscription you have to use the method: mHelper.launchSubscriptionPurchaseFlow(...) instead.

希望这有助于。

这篇关于谷歌播放应用程序内购买返回错误code -1008:空puchaseData或dataSignature的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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