token null is not for an application

2944 단어 nullapplicationtoken
Unable to add window -- token null is not for an application
11-12 11:28:13.629: E/AndroidRuntime(1439): FATAL EXCEPTION: main
11-12 11:28:13.629: E/AndroidRuntime(1439): android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application
11-12 11:28:13.629: E/AndroidRuntime(1439):     at android.view.ViewRoot.setView(ViewRoot.java:533)
11-12 11:28:13.629: E/AndroidRuntime(1439):     at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:177)
11-12 11:28:13.629: E/AndroidRuntime(1439):     at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
11-12 11:28:13.629: E/AndroidRuntime(1439):     at android.app.Dialog.show(Dialog.java:249)
11-12 11:28:13.629: E/AndroidRuntime(1439):     at com.tvie.ivideo.setting.VersionUpdate.confirmUpdate(VersionUpdate.java:103)
11-12 11:28:13.629: E/AndroidRuntime(1439):     at com.tvie.ivideo.setting.VersionUpdate.update(VersionUpdate.java:158)
11-12 11:28:13.629: E/AndroidRuntime(1439):     at com.tvie.ivideo.app.TvieApplication$1.onUpdate(TvieApplication.java:54)
11-12 11:28:13.629: E/AndroidRuntime(1439):     at com.tvie.ivideo.setting.VersionUpdate$1.onComplete(VersionUpdate.java:66)
11-12 11:28:13.629: E/AndroidRuntime(1439):     at com.tvie.ivideo.model.fetch.IVideoFetcher$FetchAsyncTask.onPostExecute(IVideoFetcher.java:94)
11-12 11:28:13.629: E/AndroidRuntime(1439):     at com.tvie.ivideo.model.fetch.IVideoFetcher$FetchAsyncTask.onPostExecute(IVideoFetcher.java:1)
11-12 11:28:13.629: E/AndroidRuntime(1439):     at android.os.AsyncTask.finish(AsyncTask.java:417)
11-12 11:28:13.629: E/AndroidRuntime(1439):     at android.os.AsyncTask.access$300(AsyncTask.java:127)
11-12 11:28:13.629: E/AndroidRuntime(1439):     at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:429)
11-12 11:28:13.629: E/AndroidRuntime(1439):     at android.os.Handler.dispatchMessage(Handler.java:99)
11-12 11:28:13.629: E/AndroidRuntime(1439):     at android.os.Looper.loop(Looper.java:130)
11-12 11:28:13.629: E/AndroidRuntime(1439):     at android.app.ActivityThread.main(ActivityThread.java:3683)
11-12 11:28:13.629: E/AndroidRuntime(1439):     at java.lang.reflect.Method.invokeNative(Native Method)
11-12 11:28:13.629: E/AndroidRuntime(1439):     at java.lang.reflect.Method.invoke(Method.java:507)
11-12 11:28:13.629: E/AndroidRuntime(1439):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:895)
11-12 11:28:13.629: E/AndroidRuntime(1439):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:653)
11-12 11:28:13.629: E/AndroidRuntime(1439):     at dalvik.system.NativeStart.main(Native Method)

The background of the exception is: check the new version in the onCreate method of Application
mVersionUpdate = new VersionUpdate(this);
mVersionUpdate.setUpdateListener(updateListener);
mVersionUpdate.checkUpdate();

좋은 웹페이지 즐겨찾기