3
我試圖啓動com.android.vending.billing.IMarketBillingService服務,並收到此消息。我使用模擬器的Android 2.3.3 - API級別10無法啓動服務com.android.vending.billing.IMarketBillingService
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.
代碼:
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;
}