繁体   English   中英

从Android中的Activity启动服务时出现“无法启动服务Intent”错误

[英]“Unable to start service Intent” error when starting service from an Activity in Android

以下是错误的确切描述 -

Unable to start service Intent {cmp=com.example.firstapp/com.radiusnetworks.ibeacon.IBeaconIntentProcessor (has extras) } U=0: not found

这是我的android manifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.firstapp"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
    android:minSdkVersion="18"
    android:targetSdkVersion="18" />
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>

<application

    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name="com.example.firstapp.MainActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
<service android:enabled="true"
    android:exported="true"
    android:isolatedProcess="false"
    android:label="iBeacon"
    android:name="com.radiusnetworks.ibeacon.service.IBeaconService">
<meta-data android:name="background" android:value="true" />
    <intent-filter 
       android:priority="1" >
        <action android:name="com.example.firstapp.DID_RANGING" />
        <action android:name="com.example.firstapp.DID_MONITORING" />
    </intent-filter>
</service>

我是android和Java的新手,但我真的必须让它工作。 提前致谢..!!

您没有注册名为IBeaconIntentProcessor的服务以及哪个包是......

com.radiusnetworks.ibeacon

这就是为什么它找不到服务。

您已注册服务IBeaconService以及哪个包

com.radiusnetworks.ibeacon.service

Manifest.xml注册您的Service ,如下所示......

<service android:name="com.radiusnetworks.ibeacon.IBeaconIntentProcessor">

暂无
暂无

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM