原因:AlertDialog.Builder新建对象时,不能用Application的Context方法 解决方法:使用活动的Context,比如 new AlertDialog.Builder(MainActivity.this);