Google播放计费静态响应。需要身份验证。您需要登录您的 Google 帐户

GooglePlay Billing Static Responses. Authentication is required. You need to sign into your Google Account

我正在测试 Google Play In App Purchase 的静态响应。

正如文档(https://developer.android.com/google/play/billing/billing_testing.html)所说,静态响应测试应该在没有 apk 上传的情况下工作。但是身份验证错误不断发生。

需要身份验证。您需要登录您的 Google 帐户

我正在使用我的开发者帐户进行测试,它也已选择加入 Beta 测试用户列表。

这是我的购买流程代码。有没有人有类似的问题?

        Bundle buyIntentBundle  = mService.getBuyIntent(3, mActivity.getPackageName(), _item, "inapp", "test");
        PendingIntent pendingIntent = buyIntentBundle.getParcelable("BUY_INTENT");

        if (pendingIntent != null)
        {
            mHelper.launchPurchaseFlow(mActivity, mActivity.getPackageName(), REQUEST_CODE, mPurchaseFinishedListener, "test");
        }
        else
        {
            // Cannot purchase
            Toast.makeText(mActivity, "purchase failed", Toast.LENGTH_SHORT).show();
        }

你从哪里得到示例代码?

mHelper.launchPurchaseFlow() 接受产品代码而非包名称的第二个参数。

您的代码必须像这样更改:

mHelper.launchPurchaseFlow(this, SKU_GAS, 10001, mPurchaseFinishedListener, "bGoa+V7g/yqDXvKRqq+JTFn4uQZbPiQJo4pf9RzJ"); https://developer.android.com/training/in-app-billing/purchase-iab-products.html