为什么我会和QUOT;无法启动服务意向"? [英] Why do I get "Unable to start service Intent"?

查看:182
本文介绍了为什么我会和QUOT;无法启动服务意向"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图得到一些AndroidPit.com牌code的工作,但我得到无法启动服务意向书。基本上我的code是这样的:

I'm trying get some licensing code from AndroidPit.com working, but I get "Unable to start service Intent". Basically my code looks like this:

        Intent licenseIntent = new Intent("de.androidpit.app.services.ILicenseService");            
        if (mContext.bindService(licenseIntent, this, Context.BIND_AUTO_CREATE))
        {
            // success
        }
        else
        {
            // failure (I get this all the time(
        }

我试图传递ILicenseService类明确的:

I tried passing ILicenseService class explicitly:

        Intent licenseIntent = new Intent(mContext, de.androidpit.app.services.ILicenseService.class);

但我仍然得到同样的问题。

but I still get the same problem.

我设法得到它使用相同的code Android Market的LVL库的工作,所以我真的不明白,为什么没有找到de.androidpit.app.services.ILicenseService,而是设法找到COM .android.vending.licensing.ILicensingService。

I managed to get Android Market LVL library working which uses identical code, so I don't really understand why it fails to find "de.androidpit.app.services.ILicenseService", but manages to find "com.android.vending.licensing.ILicensingService".

大多数我发现这里的答案说,你需要附加的东西到AndroidManifest.xml,但你不知道的com.android.vending.licensing.ILicensingService工作的事情,所以我想我不该吨需要什么de.androidpit.app.services.ILicenseService(他们都来自android.os.IInterface获得)。

Most of the answers I found here say that you need to append stuff to your AndroidManifest.xml, but you don't anything for "com.android.vending.licensing.ILicensingService" to work, so I guess I shouldn't need anything "de.androidpit.app.services.ILicenseService" (they both derive from android.os.IInterface).

先谢谢了。

推荐答案

在我的情况的解决方案是(从AndroidPit.com在这种情况下,AppCenter)开始了我的手机上的一个服务器的一部分。在AndroidManifest没有条目所必需的客户端应用程序。

The solution in my case was to start a server part on my phone (AppCenter from AndroidPit.com in this case). No entries in AndroidManifest are necessary for the client application.

这篇关于为什么我会和QUOT;无法启动服务意向"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆