可能重复:
在应用程序计费 java 未捕获的异常发生
嗨,我正在使用钛中的应用内计费模块,但它说发生了未捕获的 java 异常。你能帮我解决这方面的问题吗?这是我的代码
var InAppBilling = require('ti.inappbilling');
InAppBilling.startBillingService();
InAppBilling.requestPurchase({
productId : 'jesse',
productType : InAppBilling.ITEM_TYPE_INAPP,
//developerPayload : devPayload
});
提前致谢
[WARN][ActivityManager( 76)] Unable to start service Intent { act=com.android.vending.billing.MarketBillingService.BIND }: not found
[ERROR][BillingService( 1276)] Market Billing Service could not be bound.
[WARN][System.err( 1276)] java.lang.NullPointerException
[WARN][System.err( 1276)] at ti.inappbilling.BillingService.requestPurchase(BillingService.java:214)
[WARN][System.err( 1276)] at ti.inappbilling.InappbillingModule.requestPurchase(InappbillingModule.java:198)
[WARN][System.err( 1276)] at org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method)
[WARN][System.err( 1276)] at org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:60)
[WARN][System.err( 1276)] at org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:636)
[WARN][System.err( 1276)] at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:829)
[WARN][System.err( 1276)] at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:307)
[WARN][System.err( 1276)] at android.os.Handler.dispatchMessage(Handler.java:95)
[WARN][System.err( 1276)] at android.os.Looper.loop(Looper.java:137)
[WARN][System.err( 1276)] at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:109)