Friday, September 21, 2012

Android View not attached to window manager

Android View not attached to window manager

Problem:
java.lang.
IllegalArgumentException: View not attached to window manager
at android.view.WindowManagerImpl.findViewLocked(WindowManagerImpl.java:587)
at android.view.WindowManagerImpl.removeView(WindowManagerImpl.java:324)
at android.view.WindowManagerImpl$CompatModeWrapper.removeView(WindowManagerImpl.java:151)
at android.app.Dialog.dismissDialog(Dialog.java:325)
at android.app.Dialog$1.run(Dialog.java:123)
at android.app.Dialog.dismiss(Dialog.java:310)
at com.exalt.$IMEICheckTask.onPostExecute(Version2Activity.java:698)
at com.exalt.$IMEICheckTask.onPostExecute(Version2Activity.java:1)
at android.os.AsyncTask.finish(AsyncTask.java:602)
at android.os.AsyncTask.access$600(AsyncTask.java:156)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:615)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4447)
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:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)

Solution

@Override

protected void onPostExecute(String result) {

try{

progressDialog.dismiss();

progressDialog = null;

}

catch (Exception e) {


}

}

Check out this may be help you

Related Posts Plugin for WordPress, Blogger...