android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@438e7108 is not valid; is your activity running?
原因:子Activity启动dialog(或类似操作)引发此错误
解决方法:
AlertDialog.Builder(xxx.this) => AlertDialog.Builder(this.getParent())
或(this)改为(xxx.this)
这是解释http://tech.shantanugoel.com/2010/07/08/badtokenexception-android-dialog-getapplicationcontext.html。