从服务器[DF-AA-20]检索信息时,应用内购买错误 [英] In-app purchase Error while retrieving information from server [DF-AA-20]
问题描述
我正在尝试启用应用内结算功能.我已经在Google Play控制台上创建了应用内商品,并获得了我的许可证密钥.当我尝试购买产品时.我收到此图片错误.
i'm trying to enable in app billing. I've created In-app-products on my google play console and got my License key. When i try to purchase product. I get this image error.
这是我用来创建BillingProcessor的代码.
Here is the code i use to create BillingProcessor.
bp = new BillingProcessor(this, LICENSE_KEY, MERCHANT_ID, new BillingProcessor.IBillingHandler() {
@Override
public void onProductPurchased(@NonNull String productId, @Nullable TransactionDetails details) {
showToast("onProductPurchased: " + productId);
updateTextViews();
}
@Override
public void onBillingError(int errorCode, @Nullable Throwable error) {
showToast("onBillingError: " + Integer.toString(errorCode));
}
@Override
public void onBillingInitialized() {
showToast("onBillingInitialized");
readyToPurchase = true;
updateTextViews();
}
@Override
public void onPurchaseHistoryRestored() {
showToast("onPurchaseHistoryRestored");
for(String sku : bp.listOwnedProducts())
Log.d(LOG_TAG, "Owned Managed Product: " + sku);
for(String sku : bp.listOwnedSubscriptions())
Log.d(LOG_TAG, "Owned Subscription: " + sku);
updateTextViews();
}
});
LICENSE_KEY是我从Google Play控制台获得的许可证密钥,而MERCHANT_ID为空.
LICENSE_KEY is my license key from google play console, and MERCHANT_ID is null.
这是我购买物品的方式.
This is how i buy items.
bp.purchase(this,PRODUCT_ID);
我在Google Play控制台中使用的PRODUCT_ID是product1的地方,这是我的应用内商品的示例.
Where PRODUCT_ID is product1 which i use in my google play console, here is the example of my in-app products.
任何想法如何解决此问题? DF-AA-20问题只有一个stackoverflow问题,没有答案.互联网上也没有关于它的信息.我尝试使用模拟器和Android手机.
Any idea how to fix this ? There is only one stackoverflow question with DF-AA-20 problem which has no answers. And there is no information on the internet about it. I have tried to use emulator and my android phone.
推荐答案
DF-AA-20 意味着您的应用程序没有以任何方式在Play商店中发布.通常是因为以下任一原因:
DF-AA-20 means your app is not published in any way on the Play store. This is normally because either:
- 您尚未发布.要测试应用内结算,必须将其至少推送到alpha.请参见测试IAB文档 了解更多信息
- 您的应用或开发者帐户已被禁止/暂停滥用
- 您对软件包名称/applicationId进行了一些更改,因此在您的apk中它与Play上的不匹配.开发人员有时会通过构建风味来做到这一点
- you haven't published it yet. To test In-App Billing it must be pushed to at least alpha. See the testing IAB docs for more information
- your app or developer account has been banned/suspended for abuse
- you make some change to your package name/applicationId, so that in your apk it doesn't match the one on Play. Developers sometimes do this with build flavors
这篇关于从服务器[DF-AA-20]检索信息时,应用内购买错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!