프로젝트를 만들려고 다른 패키지에서 하나의 활동과 서비스 하나를 가지고 있습니다. 두 패키지 모두 한 프로젝트에 넣었습니다.다른 패키지에서 서비스 시작
난에서 활동 넣어 : com.idris.activity을, 나는에 서비스를 넣어 :
내가 같이 MyActivity에서 버튼의 리스너에서이면 MyService를 호출하려고 com.idris.activity.service :
Intent myIntent = new Intent(getApplicationContext(), MyService.class);
myIntent.putExtra("extraData", "somedata");
startService(myIntent);
애플리케이션의 매니페스트 시작할 수 없습니다
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="idris.parental.monitor"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="10" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:name=".MyActivity"
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:name=".MyService"
android:enabled="true" />
</application>
</manifest>
이면 MyService, 내가 무엇을 할 shuld? 매니페스트에서
, 오류 메시지 "10월 7일부터 18일까지 : 04 : 06.975 : ActivityManager/W (61) : 없음 시작하기 서비스 의도 {cmp = idris.parental.monitor/.call.CallMonitorService (추가 기능 있음}} : 찾을 수 없음 " – adrasa
매니페스트 파일을 게시하십시오. – biegleux
다시 확인하십시오. 내 게시물을 편집했습니다. – adrasa