![](/img/trans.png)
[英]Android in-app billing: custom sku purchase gives “Error - item not found”
[英]Android In-app billing purchase - Item not found
我已使用此插件為phonegap實現了應用內結算V3。 當我購買商品時,Google Play會返回以下內容
The item that you were attempting to purchase could not be found
這很可能是某個地方的設置問題,但我找不到可能是問題的地方。
到目前為止,這是我所做的:
這是我從logcat獲得的堆棧,最后是奇怪的錯誤,不確定是否相關:
D/CordovaLog(32254): file:///android_asset/www/plugins/com.smartmobilesoftware.inappbilling/www/inappbilling.js: Line 6 : InAppBilling[js]: setup ok
I/Web Console(32254): InAppBilling[js]: setup ok:6
D/CORDOVA_BILLING(32254): init start
D/CORDOVA_BILLING(32254): Creating IAB helper.
D/CORDOVA_BILLING(32254): Starting setup.
D/IabHelper(32254): Starting in-app billing setup.
W/PluginManager(32254): THREAD WARNING: exec() call to InAppBillingPlugin.init blocked the main thread for 21ms. Plugin should use CordovaInterface.getThreadPool().
D/IabHelper(32254): Billing service connected.
D/IabHelper(32254): Checking for in-app billing 3 support.
D/Finsky (32296): [2476] InAppBillingUtils.getPreferredAccount: com.montreal.deps: Account from first account - [sdkNy9OtgBRMmwDfMof3YGfedjA]
D/IabHelper(32254): In-app billing version 3 supported for com.montreal.deps
D/Finsky (32296): [2451] InAppBillingUtils.getPreferredAccount: com.montreal.deps: Account from first account - [sdkNy9OtgBRMmwDfMof3YGfedjA]
D/IabHelper(32254): Subscriptions AVAILABLE.
D/CORDOVA_BILLING(32254): Setup finished.
D/CORDOVA_BILLING(32254): Setup successful. Querying inventory.
D/IabHelper(32254): Starting async operation: refresh inventory
D/IabHelper(32254): Querying owned items, item type: inapp
D/IabHelper(32254): Package name: com.montreal.deps
D/IabHelper(32254): Calling getPurchases with continuation token: null
D/Finsky (32296): [2450] InAppBillingUtils.getPreferredAccount: com.montreal.deps: Account from first account - [sdkNy9OtgBRMmwDfMof3YGfedjA]
D/Finsky (32296): [2450] InAppBillingUtils.getPreferredAccount: com.montreal.deps: Account from first account - [sdkNy9OtgBRMmwDfMof3YGfedjA]
D/IabHelper(32254): Owned items response: 0
D/IabHelper(32254): Continuation token: null
D/IabHelper(32254): Querying SKU details.
D/IabHelper(32254): queryPrices: nothing to do because there are no SKUs.
D/IabHelper(32254): Querying owned items, item type: subs
D/IabHelper(32254): Package name: com.montreal.deps
D/IabHelper(32254): Calling getPurchases with continuation token: null
D/Finsky (32296): [2476] InAppBillingUtils.getPreferredAccount: com.montreal.deps: Account from first account - [sdkNy9OtgBRMmwDfMof3YGfedjA]
D/Finsky (32296): [2476] InAppBillingUtils.getPreferredAccount: com.montreal.deps: Account from first account - [sdkNy9OtgBRMmwDfMof3YGfedjA]
D/IabHelper(32254): Owned items response: 0
D/IabHelper(32254): Continuation token: null
D/IabHelper(32254): Querying SKU details.
D/IabHelper(32254): queryPrices: nothing to do because there are no SKUs.
D/IabHelper(32254): Ending async operation: refresh inventory
D/CORDOVA_BILLING(32254): Inside mGotInventoryListener
D/CORDOVA_BILLING(32254): Query inventory was successful.
D/CordovaLog(32254): file:///android_asset/www/plugins/com.smartmobilesoftware.inappbilling/www/inappbilling.js: Line 6 : InAppBilling[js]: buy called!
I/Web Console(32254): InAppBilling[js]: buy called!:6
D/IabHelper(32254): Starting async operation: launchPurchaseFlow
D/IabHelper(32254): Constructing buy intent for deps.item.test, item type: inapp
D/Finsky (32296): [2451] InAppBillingUtils.getPreferredAccount: com.montreal.deps: Account from first account - [sdkNy9OtgBRMmwDfMof3YGfedjA]
D/Finsky (32296): [2451] InAppBillingUtils.getPreferredAccount: com.montreal.deps: Account from first account - [sdkNy9OtgBRMmwDfMof3YGfedjA]
D/Finsky (32296): [2451] InAppBillingUtils.getPreferredAccount: com.montreal.deps: Account from first account - [sdkNy9OtgBRMmwDfMof3YGfedjA]
D/IabHelper(32254): Launching buy intent for deps.item.test. Request code: 10001
W/PluginManager(32254): THREAD WARNING: exec() call to InAppBillingPlugin.buy blocked the main thread for 28ms. Plugin should use CordovaInterface.getThreadPool().
D/CordovaActivity(32254): Paused the application!
D/CordovaWebView(32254): Handle the pause
D/FirewallPolicy( 2119): getURLFilterEnabled(true)
D/FirewallPolicy( 2119): isUrlBlocked - Policy disabled
D/WebView (32254): loadUrlImpl: called
D/webcore (32254): CORE loadUrl: called
D/webkit (32254): Firewall not null
D/FirewallPolicy( 2119): getURLFilterEnabled(true)
D/FirewallPolicy( 2119): isUrlBlocked - Policy disabled
D/webkit (32254): euler: isUrlBlocked = false
D/FirewallPolicy( 2119): getURLFilterEnabled(true)
D/FirewallPolicy( 2119): isUrlBlocked - Policy disabled
I/ClipboardServiceEx( 2119): Send intent for dismiss clipboard dialog inside hideCurrentInputLocked() !
D/WindowManager( 2119): PhoneWindowManager: focusChangedLw
D/KeyguardViewMediator( 2119): setHidden false
D/CordovaLog(32254): file:///android_asset/www/app/js/controllers/payment.js: Line 12 : response then payment
I/Web Console(32254): response then payment:12
D/CordovaLog(32254): file:///android_asset/www/app/js/controllers/payment.js: Line 13 : OK
I/Web Console(32254): OK:13
D/Finsky (32296): [1] CarrierParamsAction.createCarrierBillingParameters: Carrier billing config is null. Device is not targeted for DCB 2.
E/Finsky (32296): [2472] FileBasedKeyValueStore.delete: Attempt to delete 'paramsopT-pzzx02i69KNTNDgLqg' failed!
非常感謝,如果您發現問題,因為我已經為之奮斗了幾天。
草稿狀態的APK不再適用於測試應用內結算。 您需要在Alpha或Beta通道中釋放它。
參考: http : //developer.android.com/google/play/billing/billing_testing.html#draft_apps
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.