简体   繁体   English

无法启动服务com.android.vending.billing.IMarketBillingService

[英]Unable to start service com.android.vending.billing.IMarketBillingService

I'm trying start com.android.vending.billing.IMarketBillingService service and I received this message. 我正在尝试启动com.android.vending.billing.IMarketBillingService服务,我收到了此消息。 I'm using emulator Android 2.3.3 - API Level 10. 我正在使用模拟器Android 2.3.3 - API Level 10。

03-23 15:04:53.535: WARN/ActivityManager(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? 您是否已将IMarketBillingService.aidl添加到您的包中,然后重建您的项目?

If you have try this: 如果你试试这个:

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

worked for me 为我工作

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 已经添加:Lcom / android / vending / billing / IMarketBillingService $ Stub for intellij下有maven的android项目? - already added: Lcom/android/vending/billing/IMarketBillingService$Stub for android project with maven under intellij? ANR com.android.vending.billing.IInAppBillingService - ANR com.android.vending.billing.IInAppBillingService 服务意图必须明确:Intent {act = com.android.vending.billing.InAppBillingService.BIND} - Service Intent must be explicit: Intent { act=com.android.vending.billing.InAppBillingService.BIND } com.android.vending.billing.PURCHASES_UPDATED何时广播? - When does com.android.vending.billing.PURCHASES_UPDATED broadcast? 程序类型已存在:com.android.vending.billing.IInAppBillingService - Program type already present: com.android.vending.billing.IInAppBillingService Android结算 - 我应该实现ServiceConnection还是IMarketBillingService - Android billing - should I implement the ServiceConnection or the IMarketBillingService “com.android.vending.BILLING”和“android.permission.BILLING”的区别 - Difference Between "com.android.vending.BILLING" And "android.permission.BILLING" InApp结算,永远不会com.android.vending.billing.PURCHASE_STATE_CHANGED - InApp Billing and never get com.android.vending.billing.PURCHASE_STATE_CHANGED 无法接收来自动作com.android.vending.billing.PURCHASES_UPDATED的广播 - can not receiver broadcast from action com.android.vending.billing.PURCHASES_UPDATED Android应用内结算-未生成IMarketBillingService.java - Android In-app Billing - IMarketBillingService.java not being generated
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM