我该如何解决"错误:无法查询库存......" (Android,Eclipse,LibGDX)

时间:2016-09-30 08:34:22

标签: android eclipse libgdx inventory

有时(但不总是)在恢复应用时,我会收到消息:

Error: Failed to query inventory:
IabResult: Remote exception while refreshing inventory.
(response: -1001:Remote exception during initialization)

这是我的restorePurchases()方法。它发生在Resume()。

@Override
public void restorePurchases() {
    try {
        if (mHelper.isSetupDone() && !mHelper.isAsyncInProgress() && isInternetConnected()) {
            ArrayList<String> additionalSkuList = new ArrayList<String>();
            additionalSkuList.add(productID_hints3);
            additionalSkuList.add(productID_noads);
            additionalSkuList.add(productID_unlockBlockX + "2");
            additionalSkuList.add(productID_unlockBlockX + "3");
            additionalSkuList.add(productID_unlockBlockX + "4");
            additionalSkuList.add(productID_unlockBlockX + "5");
            additionalSkuList.add(productID_unlockBlockX + "6");
            additionalSkuList.add(productID_unlockBlockX + "7");
            additionalSkuList.add(productID_unlockBlockX + "8");
            additionalSkuList.add(productID_unlockManyBlocks);
            mHelper.queryInventoryAsync(true, additionalSkuList, null, mGotInventoryListener);
        }
    } catch (Exception e) {
        complain("Error querying inventory.");
    }
}

我该怎么做才能防止错误?它究竟意味着什么?

Error message

0 个答案:

没有答案