我的应用程序出现此错误,我不知道它是哪个活动,问题出在哪里。 这是错误日志:
STACK_TRACE = java.lang.IllegalArgumentException: View not attached to window manager
at android.view.WindowManagerImpl.findViewLocked(WindowManagerImpl.java:655)
at android.view.WindowManagerImpl.removeView(WindowManagerImpl.java:351)
at android.view.WindowManagerImpl$CompatModeWrapper.removeView(WindowManagerImpl.java:162)
at android.app.Dialog.dismissDialog(Dialog.java:319)
at android.app.Dialog.dismiss(Dialog.java:302)
at android.widget.Spinner$DialogPopup.dismiss(Spinner.java:828)
at android.widget.Spinner.onDetachedFromWindow(Spinner.java:405)
at android.view.View.dispatchDetachedFromWindow(View.java:11835)
at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2615)
at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2613)
at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2613)
at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2613)
at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2613)
at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2613)
at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2613)
at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2613)
at android.view.ViewRootImpl.dispatchDetachedFromWindow(ViewRootImpl.java:2932)
at android.view.ViewRootImpl.doDie(ViewRootImpl.java:4343)
at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:3247)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:153)
at android.app.ActivityThread.main(ActivityThread.java:5086)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:821)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584)
at dalvik.system.NativeStart.main(Native Method)
我如何找出它是什么活动以及问题是什么?
谢谢
答案 0 :(得分:1)
Probabely你正在使用一个Context来进行一个上下文不再可用的对话框。