开发者

Unable to start service com.android.vending.billing.IMarketBillingService

开发者 https://www.devze.com 2023-02-19 20:41 出处:网络
I\'m trying start com.android.vending.billing.IMarketBillingService service and I received this message. I\'m using emulator Android 2.3.3 - API Level 10.

I'm trying start com.android.vending.billing.IMarketBillingService service and I received this message. I'm using emulator Android 2.3.3 - API Level 10.

03-23 15:04:53.535: WARN/Activi开发者_运维百科tyManager(61): Unable to start service Intent { act=com.android.vending.billing.IMarketBillingService }: not found
03-23 15:04:53.535: ERROR/BillingService(416): Could not bind to service.

Code:

private boolean bindToMarketBillingService() {
    try {
        if (Consts.DEBUG) {
            Log.i(TAG, "binding to Market billing service");
        }
        boolean bindResult = bindService(
                new Intent(IMarketBillingService.class.getName()),
                this,  
                Context.BIND_AUTO_CREATE);

        if (bindResult) {
            return true;
        } else {
            Log.e(TAG, "Could not bind to service.");
        }
    } catch (SecurityException e) {
        Log.e(TAG, "Security exception: " + e);
    }
    return false;
}


have you added the IMarketBillingService.aidl to your package and then rebuilt your project?

If you have try this:

boolean bindResult = bindService(new Intent("com.android.vending.billing.MarketBillingService.BIND"), this, Context.BIND_AUTO_CREATE);

worked for me

0

精彩评论

暂无评论...
验证码 换一张
取 消