“无法找到您尝试购买的项目” Android 应用内结算

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/23918190/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 07:36:30  来源:igfitidea点击:

“The item you were attempting to purchase could not be found” Android in-app billing

androidin-app-purchasein-app-billing

提问by CyberedElf

I am receiving this error while testing my app.

我在测试我的应用程序时收到此错误。

The app is signed and uploaded to the alpha testing portion of the developer console.

应用程序已签名并上传到开发者控制台的 alpha 测试部分。

The in-app item has the status "Active".

应用内项目的状态为“活动”。

I have entered an account other than my developer account in "testing access".

我在“测试访问”中输入了我的开发者帐户以外的帐户。

I am using a device with the primary account in the "testing access" and not the developer account.

我在“测试访问”中使用主帐户而不是开发者帐户的设备。

I have double checked the spelling of my SKU.

我已经仔细检查了我的 SKU 的拼写。

The exact same .apk was uploaded to Developer Console and installed on the test device.

完全相同的 .apk 被上传到开发者控制台并安装在测试设备上。

I have double checked the license key.

我已经仔细检查了许可证密钥。

I have waited more than 12 hours for SKU and testing accounts to be propagated.

我已经等了 12 个多小时,才传播 SKU 和测试帐户。

Everything appears to work when I use android.test.purchased.

当我使用 android.test.purchased 时,一切似乎都有效。

There are multiple questions concerning this error. Related links that got me this far include: https://groups.google.com/forum/#!topic/android-developers/A2RM4P34zo0

关于此错误有多个问题。让我走到这一步的相关链接包括:https: //groups.google.com/forum/#!topic/android-developers/A2RM4P34zo0

How to resolve “The item you were attempting to purchase could not be found”

如何解决“找不到您尝试购买的商品”

"the item you were attempting to purchase could not be found" after following instructions

按照说明操作后“无法找到您尝试购买的商品”

"the item you were attempting to purchase could not be found"

“无法找到您尝试购买的商品”

http://developer.android.com/google/play/billing/billing_testing.html#billing-testing-test

http://developer.android.com/google/play/billing/billing_testing.html#billing-testing-test

Testing Android In-App purchases with unpublished apps

使用未发布的应用测试 Android 应用内购买

Android in-app purchase for alpha test mode

用于 Alpha 测试模式的 Android 应用内购买

Error: the item you were attemping to purchase could not be found

错误:无法找到您尝试购买的商品

https://stackoverflow.com/questions/23917264/item-could-not-be-found-in-app-billing-issue

https://stackoverflow.com/questions/23917264/item-could-not-be-found-in-app-billing-issue

In App Billing - product not found

In App Billing - 未找到产品

Android billing - item not found

Android 计费 - 未找到项目

http://developer.android.com/training/in-app-billing/list-iab-products.html

http://developer.android.com/training/in-app-billing/list-iab-products.html

http://www.techotopia.com/index.php/Integrating_Google_Play_In-app_Billing_into_an_Android_Application_%E2%80%93_A_Tutorial

http://www.techotopia.com/index.php/Integrating_Google_Play_In-app_Billing_into_an_Android_Application_%E2%80%93_A_Tutorial

Do test accounts require real credit card to purchase via In-app Billing?

测试帐户是否需要真实的信用卡才能通过应用内购买购买?

What else can be causing this error?

还有什么可能导致此错误?

One time I got past this point. My wife's phone and account are used for testing. It appeared to work after including her account to have testing access and waiting 3 hours. The item was found and it asked to verify her account password. I handed her the device, she entered the password, she said there was an error and closed the dialog. I do not know what that error was, and I have not been able to get back to that point. I am certain that the item was not purchased, because it does not show up on the owned list. After this, I used another device with another account and another 3 hours. The new device never gets anything other than the item not found error while using the active SKU.

有一次我超越了这一点。我老婆的手机和账号是用来测试的。在包括她的帐户以进行测试访问并等待 3 小时后,它似乎起作用了。该项目被找到并要求验证她的帐户密码。我把设备递给她,她输入了密码,她说有错误并关闭了对话框。我不知道那个错误是什么,我无法回到那个点。我确定该物品没有被购买,因为它没有出现在拥有的列表中。在此之后,我用另一个帐户使用了另一台设备,又用了 3 个小时。新设备在使用活动 SKU 时,除了“找不到项目”错误外,永远不会得到任何其他信息。

回答by skullthug

Had the same problem. I contacted as well and got this response from Google

有同样的问题。我也联系过并得到了 Google 的回复



Thank you for contacting Google Play Developer Support and reporting the behavior you're seeing with in-app billing.

感谢您联系 Google Play 开发者支持并报告您看到的应用内结算行为。

We recently made some changes to our systems and we are now requiring an app to be published before testing. We are currently recommending to publish your APK to the Alpha channel in order to test licensing, in-app billing, and expansion files. There is no need to create a special testing group in the Alpha channel to test these features, however the app must be published and not in draft mode.

我们最近对我们的系统进行了一些更改,现在我们要求在测试之前发布应用程序。我们目前建议将您的 APK 发布到 Alpha 渠道,以测试许可、应用内计费和扩展文件。无需在 Alpha 通道中创建专门的测试组来测试这些功能,但应用程序必须已发布且不能处于草稿模式。

We apologize for the inconvenience and are working to update our documentation to reflect these changes.

对于给您带来的不便,我们深表歉意,并正在努力更新我们的文档以反映这些更改。



After publishing my APK to Alpha (as I haven't launched yet) and waiting an hour or so, my IAP test purchases started working again.

在将我的 APK 发布到 Alpha(因为我还没有启动)并等待一个小时左右后,我的 IAP 测试购买又开始工作了。

回答by elt0r0

I was experiencing this issue and just chatted with Google's support via https://support.google.com/googleplay/android-developer/?hl=en#contact=1

我遇到了这个问题,只是通过https://support.google.com/googleplay/android-developer/?hl=en#contact=1与 Google 的支持人员聊天

and they said that I needed to publish the app. That meant adding screenshots, a description etc and then publishing (Clicking on the publish button in the upper right corner of the developer console). If your app is in the draft state, that could be the issue.

他们说我需要发布应用程序。这意味着添加屏幕截图、描述等,然后发布(点击开发者控制台右上角的发布按钮)。如果您的应用程序处于草稿状态,那可能就是问题所在。

edit: This is now spelled out in the developer docs here:

编辑:这现在在开发人员文档中详细说明:

http://developer.android.com/google/play/billing/billing_testing.html#draft_apps

http://developer.android.com/google/play/billing/billing_testing.html#draft_apps

Draft Apps are No Longer Supported

Previously, you could publish a "draft" version of your app for testing. This functionality is no longer supported. Instead, there are two ways you can test how a pre-release app functions on the Google Play store:

You can publish an app to the alpha or beta distribution channels. This makes the app available on the Google Play store, but only to the testers you put on a "whitelist". In a few cases, you can test Google Play functionality with an unpublished app. For example, you can test an unpublished app's in-app billing support by using static responses, special reserved product IDs that always return a specific result (like "purchased" or "refunded").

不再支持草稿应用

以前,您可以发布应用的“草稿”版本进行测试。不再支持此功能。相反,您可以通过两种方式测试预发布应用在 Google Play 商店中的运行情况:

您可以将应用发布到 Alpha 或 Beta 分发渠道。这使得该应用程序可在 Google Play 商店中使用,但仅限于您列入“白名单”的测试人员。在少数情况下,您可以使用未发布的应用测试 Google Play 功能。例如,您可以通过使用静态响应、始终返回特定结果(如“已购买”或“已退款”)的特殊预留产品 ID 来测试未发布应用的应用内结算支持。

回答by A. Adam

Had spend hours trying to test IAB, though few days ago it worked.

花了几个小时试图测试 IAB,尽管几天前它奏效了。

Here is the change ....

这是变化......

"Draft Apps are No Longer Supported Previously, you could publish a "draft" version of your app for testing. This functionality is no longer supported. Instead, there are two ways you can test how a pre-release app functions on the Google Play store:

“不再支持草稿应用程序以前,您可以发布应用程序的“草稿”版本进行测试。不再支持此功能。相反,您可以通过两种方式测试预发布应用程序在 Google Play 上的运行方式店铺:

You can publish an app to the alpha or beta distribution channels. This makes the app available on the Google Play store, but only to the testers you put on a "whitelist"."

您可以将应用发布到 Alpha 或 Beta 分发渠道。这使得该应用程序可在 Google Play 商店中使用,但仅限于您列入“白名单”的测试人员。”

@ http://developer.android.com/google/play/billing/billing_testing.html#draft_apps

@ http://developer.android.com/google/play/billing/billing_testing.html#draft_apps

Hope these crucial changes are emailed to developers saving hours..

希望这些重要的更改通过电子邮件发送给开发人员,以节省时间。

回答by voytez

In my case I didnt accept alpha tester invitation after adding my email address. You need to go to generated link in google play console and accept invitation.

就我而言,在添加我的电子邮件地址后,我没有接受 alpha 测试员邀请。您需要转到 google play 控制台中生成的链接并接受邀请。

回答by user3788120

I am having significant trouble with the in-app-billing as well, but I found some pointer's from Stefan's blog here: https://www.gaffga.de/implementing-in-app-billing-for-android/and found that he was using a special prefix "android.test"So for example, I create an sku in the developer console called "purchased" And then, use "android.test.purchased" in referencing it.

我在应用内计费方面也遇到了重大问题,但我从 Stefan 的博客中找到了一些指针:https: //www.gaffga.de/implementing-in-app-billing-for-android/并发现他使用了一个特殊的前缀“android.test”,例如,我在开发者控制台中创建了一个名为“purchased”的 sku,然后在引用它时使用“android.test.purchased”。

This worked for me to at least get the error message to go away. However, it may still be stuck in a test mode limbo.

这对我来说至少可以让错误消息消失。但是,它可能仍处于测试模式的边缘。