全新应用Closed Testing轨道IAP返回ITEM_UNAVAILABLE求助
我正在为一个仅用于IAP测试的全新Android包调试ITEM_UNAVAILABLE(响应码4)问题,已完成常规排查清单中的所有项,目前仅剩一个疑点,希望确认是否有其他开发者遇到相同问题。
环境配置
- 主应用:
com.example.app— 已上线Production,IAP功能正常。 - 测试应用:
com.example.app.beta— 专为IAP测试注册的关联包,首次在Play Console中创建。 - 测试应用从未发布,仅部署在Closed Testing轨道。
- 同一设备和Google账号可在主应用正常购买IAP,排除账号、设备或商户账号问题。
- 使用Play Billing Library v7(
BillingClient)。
问题症状
W/ProxyBillingActivity: Activity finished with resultCode 3 and billing's responseCode: 4
queryProductDetailsAsync()执行成功 — 元数据加载完成,ProductDetails对象数据完整。launchBillingFlow()打开ProxyBillingActivity后立即结束,返回ITEM_UNAVAILABLE。- 现有产品ID和全新测试产品
test.dev_only均出现相同问题,排除产品本身问题,整个应用在计费流程阶段被拦截。
最简计费流程代码
val params = QueryProductDetailsParams.newBuilder() .setProductList(listOf( QueryProductDetailsParams.Product.newBuilder() .setProductId("test.dev_only") .setProductType(BillingClient.ProductType.INAPP) .build() )) .build() billingClient.queryProductDetailsAsync(params) { result, productDetailsList -> // result.responseCode == OK, productDetailsList is non-empty val flowParams = BillingFlowParams.newBuilder() .setProductDetailsParamsList(listOf( BillingFlowParams.ProductDetailsParams.newBuilder() .setProductDetails(productDetailsList.first()) .build() )) .build() billingClient.launchBillingFlow(activity, flowParams) // -> ProxyBillingActivity opens, immediately finishes with responseCode 4 }
已验证项(均正常)
| 检查项 | 状态 |
|---|---|
| APK使用Play App Signing密钥签名(从Play Console下载签名APK,非本地签名构建) | 正常 |
使用adb install -i com.android.vending …安装,installerPackageName = com.android.vending | 正常 |
| 已在账号→授权测试中注册授权测试者 | 正常 |
| 设备上的活跃Google账号与授权测试者一致 | 正常 |
| 产品ID完全匹配(无拼写错误) | 正常 |
| 产品状态为活跃,已设置价格,覆盖所有可用地区 | 正常 |
| Closed Testing的AAB已发布,轨道处于活跃状态 | 正常 |
| Closed Testing版本已通过政策审核 | 正常 |
| 测试者邮箱已加入Closed Testing测试组 | 正常 |
| 已在测试设备上打开并接受加入链接 | 正常 |
| 已等待超过24小时 | 正常 |
| 全新测试产品仍出现相同问题 | 异常 |
剩余疑点
应用的“未发布”状态是否是独立于轨道发布状态的IAP拦截限制?
- 在Play Console应用列表中,测试应用显示**“未发布”**标签(主应用显示“Production”)。
- Closed Testing轨道已活跃并通过审核,但
https://play.google.com/store/apps/details?id=com.example.app.beta返回404(无商店列表页面)。 - 官方文档指出:
应用已发布至公开测试、封闭测试、内部测试或正式发布轨道。
似乎Closed Testing发布应算作“已发布”,但实际应用状态从未切换为已发布;文档同时提到授权测试者可从草稿/未发布应用购买,与实际情况矛盾。 - 其他来源(论坛帖子、RevenueCat社区)显示,仅Production或Open Testing发布可切换应用状态为已发布,Closed/Internal Testing无法单独实现。
问题
- 是否有开发者在全新应用仅部署Closed Testing轨道、应用状态保持
“未发布”时成功完成IAP购买? - 是否必须至少发布至Production或Open Testing轨道才能解除IAP限制?
- 是否有官方来源(文档、Play Console帮助文章或Google员工回复)确认应用状态是否为独立于轨道的IAP限制?
- 未发布/草稿应用是否存在已知消费限额,导致
launchBillingFlow返回ITEM_UNAVAILABLE但queryProductDetails成功?
若有可证实或推翻“应用状态必须为已发布”假设的一手经验,将十分感谢。
内容的提问来源于stack exchange,提问作者임세현
相关产品推荐
相关产品推荐

