我已经检查了互联网连接,并且Google Play市场安装了最新的软件包版本。
基本上,Parable失败了,因为应用内购买的buyIntent在第一次使用后返回null。
这是代码,我怀疑这个块中的错误(没有其他地方)
我也是从catch块返回的,但我不确定它是什么意思,包名称已更改,因为我不希望我的应用程序显示。
错误:(不是来自我的包,而是系统级别)
[79] InAppBillingUtils.getPreferredAccount: com.mypackage.appname: Account from first account - [jbC6uT04zd8tXCrK]
代码:
Bundle buyIntentBundle = null;
try
{
buyIntentBundle =
mServiceConnection.mBillingService.getBuyIntent(
3,
mContext.getPackageName(),
mPurchaseCodesAsStrings[PurchaseType],
"inapp",
mDeveloperPayload
);
}
catch (RemoteException e)
{
e.printStackTrace();
}
PendingIntent pendingIntent = buyIntentBundle.getParcelable("BUY_INTENT");
答案 0 :(得分:11)
如果您使用API版本3并尝试重新购买MANAGED应用内商品,则会出现此错误。所有产品均为版本3管理。
在尝试再次购买之前,您必须基本消耗已存在的MANAGED产品。