Android:ProgressDialog.show()与getApplicationContext一起崩溃
我似乎无法理解为什么会这样。这段代码: mProgressDialog = ProgressDialog.show(this, "", getString(R.string.loading), true); 效果很好。但是,此代码: mProgressDialog = ProgressDialog.show(getApplicationContext(), "", getString(R.string.loading), true); 引发以下异常: W/WindowManager( 569): Attempted to add window with non-application token WindowToken{438bee58 token=null}. Aborting. D/AndroidRuntime( 2049): Shutting down VM W/dalvikvm( 2049): threadid=3: thread exiting with uncaught exception (group=0x4001aa28) E/AndroidRuntime( 2049): Uncaught handler: thread main exiting due to …