文章目录 考察的知识点 一、使用Application的Context出现什么状况? 二、Window、WM、WMS、Token的概念? 三、 Dialog的窗口属于什么类型? 四、生命周期管理 五、示例 五、结论 六、token到底是什么? 考察的知识点 Window、WindowManager、WindowMangerService之间的关系 享学 Dialog使用Activity的Token的原因 一、使用Application的Context出现什么状况? 如果使用 Application 的 Context 来创建和显示一个 Dialog,会导致如下错误: Caused by: android.view.WindowManager$BadTokenException: Unable