首页 > 解决方案 > 为什么我在连接 BillingClient 时收到 DEVELOPER_ERROR 响应代码?

问题描述

/**
 * Invalid arguments provided to the API. This error can also indicate that the application was
 * not correctly signed or properly set up for In-app Billing in Google Play, or does not have
 * the necessary permissions in its manifest
 */
int DEVELOPER_ERROR = 5;

我正在使用 Google Play 签名 - 所以我上传 App Bundle 以进行发布。我想知道这是否有某种关系?(因为 Google Play 在其后端使用自己的签名密钥而不是本地密钥)

我的清单中有 com.android.vending.BILLING 权限,并且我能够成功地使用“测试卡”进行调试构建。我只是通过我记录失败事件的 Bugsnag 报告才注意到这个问题。

有谁知道为什么会这样?

标签: androidin-app-billingandroid-app-signingandroid-app-bundle

解决方案


In the Google Cloud Console, you need to configure the API credentials to whitelist your package name and the certificate. The certificate is the one that is listed as "App Signing certificate" in the "App Signing" page in the Play Console.


推荐阅读