导致报这个错是在于new AlertDialog.Builder(mcontext),虽然这里的参数是AlertDialog.Builder(Context context)但我们不能使用getApplicationContext()获得的Context,而必须使用Activity,因为只有一个Activity才能添加一个窗体。
相关文章
- Caused by: android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application
- android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application
- Unable to add window -- token null is not for an application错误的解决方法 android开发
- popupwindow使用之异常:unable to add window -- token null is not valid
- Android自用-----WindowManager$BadTokenException: Unable to add window -- token null is not for an application
- Xamarin Android.Views.WindowManagerBadTokenException: Unable to add window -- token android.os.BinderProxy
- AsyncTask 与 对话框显示 view.WindowManager$BadTokenException: Unable to add window…is not valid; is your a
- Unable to add window -- token android.os.BinderProxy@3a067204 is not valid错误分析记录
- WindowManager$BadTokenException: Unable to add window permission denied for this window type
- Android Studio:Unable to add window android.view.ViewRootImpl$W@5e2d85a -- permission denied for this window 第一行代码