在特定设备(华为平板电脑)上发生BILLING_RESPONSE_RESULT_DEVELOPER_ERROR

时间:2019-07-18 08:49:58

标签: java

我通过Android Studio上的gradle将google inapp计费sdk迁移到了2.0.1,即“ com.android.billingclient:billing:2.0.1”

可以使用一台设备,但华为平板电脑始终显示以下日志 'BillingClient:getSkuDetails()失败。响应码:5'

我检查了结算许可和测试帐户 但没有问题...

mBillingClient.startConnection(new BillingClientStateListener() {
@Override
        public void onBillingSetupFinished(BillingResult billingResult) {
                if (billingResult.getResponseCode() == BillingClient.BillingResponseCode.OK) {
                    // The billing client is ready. You can query purchases here.
                    List<String> skuList = new ArrayList<> ();

                    skuList.add(productIDs[0]);
                    skuList.add(productIDs[1]);
                    skuList.add(productIDs[2]);
                    skuList.add(productIDs[3]);
                    skuList.add(productIDs[4]);
                    skuList.add(productIDs[5]);
                    skuList.add(productIDs[6]);
                    skuList.add(productIDs[7]);
                    skuList.add(productIDs[8]);
                    skuList.add(productIDs[9]);

                    SkuDetailsParams.Builder params = SkuDetailsParams.newBuilder();
                    params.setSkusList(skuList).setType(BillingClient.SkuType.INAPP);

                    mBillingClient.querySkuDetailsAsync(params.build(),
                            new SkuDetailsResponseListener() {
                                @Override
                                public void onSkuDetailsResponse(BillingResult billingResult,
                                                                 List<SkuDetails> skuDetailsList) {
                                    Log.d(logTag, "inapp initializing : " + billingResult.getResponseCode() + skuDetailsList.toString()); // responseCode always 5
                                    if(billingResult.getResponseCode() == BillingClient.BillingRespon`enter code here`seCode.OK && skuDetailsList != null) {

BillingClient:getSkuDetails()失败。响应码:5

0 个答案:

没有答案