2014-03-05 34 views
3

這裏是無錯誤「無法啓動服務意向書」從活動中的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,但我真的必須讓它工作。 在此先感謝.. !!

+0

顯示代碼啓動服務 –

回答

0

您沒有註冊您的服務命名爲IBeaconIntentProcessor和包...

com.radiusnetworks.ibeacon 

這就是爲什麼它無法找到該服務。

你必須註冊一個服務IBeaconService和封裝是

com.radiusnetworks.ibeacon.service 

註冊您在Manifest.xmlService如下...

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

如何註冊它在這個文件中? – Anshum17

+0

看到我更新的答案。 –

+0

我更新了您的更改。現在同樣的一行正在重複 - 「試圖通過意圖回調:ComponentInfo {com.example.firstapp/com.radiusnetworks.ibeacon.IBeaconIntentProcessor}」 – Anshum17