Exception java.lang.IllegalArgumentException: View=com.android.internal.policy.impl.PhoneWindow$DecorView{2f9ae631 V.E….. R…..I. 0,0-0,0} not attached to window manager
android.view.WindowManagerGlobal.findViewLocked (WindowManagerGlobal.java:417)
android.view.WindowManagerGlobal.removeView (WindowManagerGlobal.java:343)
android.view.WindowManagerImpl.removeViewImmediate (WindowManagerImpl.java:116)
android.app.ActivityThread.handleDestroyActivity (ActivityThread.java:4011)
android.app.ActivityThread.access$1400 (ActivityThread.java:178)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1524)
android.os.Handler.dispatchMessage (Handler.java:111)
android.os.Looper.loop (Looper.java:194)
android.app.ActivityThread.main (ActivityThread.java:5637)
java.lang.reflect.Method.invoke (Method.java)
java.lang.reflect.Method.invoke (Method.java:372)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:959)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:754)
해결책 : 해당 클래스에서 startActivity를 호출하는 부분에서 오류가 발생한다.
이유는 해당 클래스가 종료되었는데 호출되는 경우이다.
아래처럼 해보기바란다.
if(!StatusActivity.this.isFinishing()) {
Intent home = new Intent(getApplicationContext(), MainActivity.class);
startActivity(home);
}