使用AlertDialog
时报错
Caused by: android.view.WindowManager$BadTokenException: Unable to add window – token null is not valid; is your activity running?
解决:
AlertDialog
的Context参数应该为: xxxActivity.xxx
这是我的主程序,所以我的Context
应该是B000Activity.b000