-1
나는 BroadCastReceiver를 사용하여 매 30 분마다 GPS 위치를 얻으려고합니다. 하지만 다음과 같은 오류가 발생했습니다.Android 애플리케이션의 타이머 기능에서 런타임 오류가 발생 했습니까?
오류 메시지
01-09 17:24:44.340: ERROR/AndroidRuntime(2324): java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare().
내 코드
mTimer = new Timer();
mTimerTask = new TimerTask() {
@Override
public void run() {
result();//here i cal the Gps function
}
};
mTimer.scheduleAtFixedRate(mTimerTask,1000,50000);
내 방법 결과()가 호출 받고 있지 않습니다.
이전 게시물에서 말씀 드렸듯이이 질문은 여러 번이 웹 사이트에서 묻고 대답했습니다. 중복 된 http://stackoverflow.com/questions/3875184/cant-create-handler-inside-thread-that-has-not-called-looper-prepare – THelper
result()는 모든 뷰를 변경합니까? –
jusi 여기에 위도 값이 있습니다. – user1138509