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

问题描述

我正在尝试使用来自android文档的伪造商品android.test.purchased来测试我的应用内购买流程.我无法测试此流程,只是在启动它时出现以下错误:您请求的商品不可购买".我的清单中有此权限,但我不明白为什么我会用伪造的商品android.test.purchased收到此错误.

I'm trying to test my in app purchase flow with the fake item android.test.purchased, from android documentation. I'm not able to test this flow, just when I launch it, I get this error: "The item you requested is not available for purchase". I have the permission in my manifest and I don't understand why I get this error with the fake item android.test.purchased.

推荐答案

以下是Google IAB测试的要求列表.

Here is the list of requirements for the Google IAB testing.

先决条件:

  1. AndroidManifest必须包含"com.android.vending.BILLING"许可.
  2. APK是在发布模式下构建的.
  3. APK已用发行证书签名.
  4. APK已上传到alpha/beta分发渠道(以前是-草稿)到开发者控制台至少一次. (需要一些时间〜2h-24h).
  5. IAB产品已发布,其状态设置为有效.
  6. 测试帐户已添加到开发者控制台中.
  1. AndroidManifest must include "com.android.vending.BILLING"permission.
  2. APK is built in release mode.
  3. APK is signed with the release certificate(s).
  4. APK is uploaded to alpha/beta distribution channel (previously - asa draft) to the developer console at least once. (takes some time~2h-24h).
  5. IAB products are published and their status set to active.
  6. Test account(s) is added in developer console.

测试要求:

  1. 测试APK的版本代码与上传到开发者的版本代码相同控制台.
  2. 测试APK已使用与上传的证书相同的证书进行了签名到开发控制台.
  3. 测试帐户(不是开发人员)-是设备上的主要帐户.
  4. 选择了测试帐户作为测试人员,并将其链接到有效的帐户付款方式.
  1. Test APK has the same versionCode as the one uploaded to developerconsole.
  2. Test APK is signed with the same certificate(s) as the one uploadedto dev.console.
  3. Test account (not developer) - is the main account on the device.
  4. Test account is opted-in as a tester and it's linked to a validpayment method.

参考文献.

这篇关于带有android.test.purchased项的Android应用内结算错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-19 18:34