本文介绍了getSkuDetails()返回0项返回空数组DETAILS_LIST的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在我的应用程序中构建inapp计费系统。
执行后

I am building the "inapp" billing system in my application.After i execute

skuDetails = mService.getSkuDetails(3, "my_app_package_name", "inapp", bundle);
ArrayList<String> responseList = skuDetails.getStringArrayList("DETAILS_LIST");

我总是得到 responseList.size()等于0,即使我在开发者控制台的应用内商品中设置了2个项目,我也将它们传递给:

I always get responseList.size() equal to 0, even if i have set 2 items in "in-app products" in the developer console, and i am passing them to:

ArrayList<String> skuList = new ArrayList<String> ();
skuList.add("first_id");
skuList.add("second_id");
Bundle bundle = new Bundle();
querySkus.putStringArrayList("ITEM_ID_LIST", bundle);

此应用目前处于草稿状态。

The app is currently in Draft.

操作结果代码为0.

我仔细检查了传递给的base64密钥:

I double checked the base64 key i pass to:

mHelper = new IabHelper(this,Config.getBase64publicKey());

我在主线程或asynctask中尝试了 .getSkuDetails()

I tried .getSkuDetails() both in main thread or in an asynctask.

有人可以帮助我或者建议检查其他事项?

Can somebody help me out or suggest other things to check?

推荐答案

测试应用内购买不再支持草案应用测试。因此,你得到一个空的回应。

Draft app testing is no long supported for testing in-app purchases. Hence you are getting an empty response.


  1. 您需要将它们移至alpha或beta频道

  2. 添加静态响应。

这篇关于getSkuDetails()返回0项返回空数组DETAILS_LIST的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-18 09:41
查看更多