Android 2.3.3 프로젝트에서 다른 서비스의 인 텐트를 사용하여 서비스를 시작하려고하면 오류가 발생합니다. java.lang.IllegalArgumentException가 : 의도 {. 행동 = (클래스 명) CMP = (클래스 이름)/(안드로이드 명)}으로 서비스를 시작할 수 없습니다 : 오류는 공급자 == null이다른 서비스의 인 텐트에서 서비스를 시작하면 런타임 오류가 발생합니다.
방법 전화 :
private void startLocationService(){
intent = new Intent("com.example.Android.LocationService");
intent.setClass(MainService.this.getApplicationContext(), LocationService.class);
startService(intent);
}
매니페스트 :
<service android:name=".LocationService">
<intent-filter>
<action android:name="com.example.Android.LocationService"/>
</intent-filter>
</service>
</application>
도움을 주셔서 감사합니다. 실제로 내 LocationService에서 공급자가 null이 된 사용 권한을 잊어 버렸습니다. – Krmiller92