如何解决 getBuyIntent 上的 PurchaseError{type=3 subtype=0}
How can I resolve PurchaseError{type=3 subtype=0} on getBuyIntent
ServiceConnection 工作正常,我可以正确进行 getPurchases 但我无法购买产品。此代码在片段中
PendingIntent pendingIntent = iabService.getBuyIntent(3, getActivity().getPackageName(), sku, "inapp", null).getParcelable("BUY_INTENT");
getActivity().startIntentSenderForResult(pendingIntent.getIntentSender(), 42, new Intent(), 0, 0, 0);
并且我收到带有 "the item you requested is not available for purchase" 的弹出窗口,这是日志。我提出问题是因为没有 type=3 subtype=0.
D/Finsky: [12320] InAppBillingUtils.getPreferredAccount: it.localhost.itracking: Account determined from installer data - [zgXmi3sMHad8nr8tOaCFW_uVDgo]
I/ActivityManager: START u0 {cmp=com.android.vending/com.google.android.finsky.billing.lightpurchase.IabV3Activity (has extras)} from uid 10024 on display 0
V/GLSActivity: AuthDelegateWrapperCreated with selected intent: Intent { cmp=com.google.android.gms/.auth.DefaultAuthDelegateService }
V/GLSActivity: AuthDelegateWrapperCreated with selected intent: Intent { cmp=com.google.android.gms/.auth.DefaultAuthDelegateService }
V/GLSActivity: AuthDelegateWrapperCreated with selected intent: Intent { cmp=com.google.android.gms/.auth.DefaultAuthDelegateService }
I/ActivityManager: Displayed com.android.vending/com.google.android.finsky.billing.lightpurchase.IabV3Activity: +350ms
I/WCNSS_FILTER: ibs_msm_serial_clock_vote: vote UART CLK OFF using UART driver's ioctl()
I/qtaguid: Failed write_ctrl(u 19) res=-1 errno=22
I/qtaguid: Untagging socket 19 failed errno=-22
W/NetworkManagementSocketTagger: untagSocket(19) failed with errno -22
D/Finsky: [1] PurchaseFragment.onStateChange: Error: PurchaseError{type=3 subtype=0}
D/Finsky: [1] PurchaseFragment.onStateChange: Purchase failed: PurchaseError{type=3 subtype=0}
另一个信息是该应用程序诞生于 eclipse 并且可以运行,当我将项目移动到 android studio 时我收到此错误。
此错误表明您没有将此版本放入应用内结算控制台中,无论是生产版还是 Beta 版或 Alpha 版。你把你的版本放在其中之一了吗?
也许你可以看看这个。
https://developer.android.com/google/play/billing/billing_testing.html
问题单独解决
我在测试版中发布应用程序时收到此错误:我可以上传并作为草稿放置,但我无法在测试版中发布
一段时间后我将能够在测试版中发布并且在应用程序中也能正常工作
我不知道为什么
ServiceConnection 工作正常,我可以正确进行 getPurchases 但我无法购买产品。此代码在片段中
PendingIntent pendingIntent = iabService.getBuyIntent(3, getActivity().getPackageName(), sku, "inapp", null).getParcelable("BUY_INTENT");
getActivity().startIntentSenderForResult(pendingIntent.getIntentSender(), 42, new Intent(), 0, 0, 0);
并且我收到带有 "the item you requested is not available for purchase" 的弹出窗口,这是日志。我提出问题是因为没有 type=3 subtype=0.
D/Finsky: [12320] InAppBillingUtils.getPreferredAccount: it.localhost.itracking: Account determined from installer data - [zgXmi3sMHad8nr8tOaCFW_uVDgo]
I/ActivityManager: START u0 {cmp=com.android.vending/com.google.android.finsky.billing.lightpurchase.IabV3Activity (has extras)} from uid 10024 on display 0
V/GLSActivity: AuthDelegateWrapperCreated with selected intent: Intent { cmp=com.google.android.gms/.auth.DefaultAuthDelegateService }
V/GLSActivity: AuthDelegateWrapperCreated with selected intent: Intent { cmp=com.google.android.gms/.auth.DefaultAuthDelegateService }
V/GLSActivity: AuthDelegateWrapperCreated with selected intent: Intent { cmp=com.google.android.gms/.auth.DefaultAuthDelegateService }
I/ActivityManager: Displayed com.android.vending/com.google.android.finsky.billing.lightpurchase.IabV3Activity: +350ms
I/WCNSS_FILTER: ibs_msm_serial_clock_vote: vote UART CLK OFF using UART driver's ioctl()
I/qtaguid: Failed write_ctrl(u 19) res=-1 errno=22
I/qtaguid: Untagging socket 19 failed errno=-22
W/NetworkManagementSocketTagger: untagSocket(19) failed with errno -22
D/Finsky: [1] PurchaseFragment.onStateChange: Error: PurchaseError{type=3 subtype=0}
D/Finsky: [1] PurchaseFragment.onStateChange: Purchase failed: PurchaseError{type=3 subtype=0}
另一个信息是该应用程序诞生于 eclipse 并且可以运行,当我将项目移动到 android studio 时我收到此错误。
此错误表明您没有将此版本放入应用内结算控制台中,无论是生产版还是 Beta 版或 Alpha 版。你把你的版本放在其中之一了吗?
也许你可以看看这个。
https://developer.android.com/google/play/billing/billing_testing.html
问题单独解决
我在测试版中发布应用程序时收到此错误:我可以上传并作为草稿放置,但我无法在测试版中发布
一段时间后我将能够在测试版中发布并且在应用程序中也能正常工作
我不知道为什么