박상권의 삽질블로그

[Android ERROR&SOLVE]threadid=1: thread exiting with uncaught exception 본문

IT/Android-ERROR&SOLVE

[Android ERROR&SOLVE]threadid=1: thread exiting with uncaught exception

박상권 2015. 7. 24. 20:33

안드로이드 개발자들이 모여있는 오픈채팅방에 참여해보세요 .
Q&A 및 팁을 공유하는 방입니다..
오픈채팅방 참여



블로그를 Medium으로 옮겨서 운영하고 있습니다.
앞으로 새로운 글은 모두 미디엄 블로그를 통해서 올릴 예정입니다.
미디엄에서 다양하고 유익한 포스팅을 살펴보세요
미디엄 블로그 보기






07-22 15:57:07.870      347-347/kr.co.selphone W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x417842a0)



의심 1


에러가 발생할때 Logcat에 exception만 warning으로 뜨고 에러 스택이 찍히지 않는경우는 Google Analystics의 설정을 의심해보아야 합니다.

Google Analystics의 enableExceptionReporting기능을 활성화 시켜놓았다면 이를 비활성화 해주면 에러가 발생할때 오류스택을 볼수 있습니다.



when you have only uncaught exception without error log stack in logcat, check your Google Analystics setting.

If you disable your enableExceptionReporting option, your error log stack will show in your log cat





의심 2


RxJava를 사용하고 있는경우 onError() 함수를 추가하지않아서 문제가 발생하는경우도 있습니다.





그래도 해결이 안되면?


강제로 에러로그를 찍는 코드를 Application Class 혹은 MainActivity의 onCreate()에 넣어둡니다.


try {
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
@Override
public void uncaughtException(Thread thread, Throwable ex) {
ex.printStackTrace();
}
});

}catch (SecurityException e){
e.printStackTrace();
}


Comments