PopupWindow $BadTokenException: Unable to add window — token null is not valid

后端 未结 11 2202

I have the following error when showing a PopupWindow. The errors are triggered by the line:

checkInPopup.showAtLocation((ViewGroup) mapView.getParent(), Gra         


        
11条回答
  •  青春惊慌失措
    2020-11-27 05:16

    There are two scenarios when this exception could occur. One is mentioned by nandeesh. Other scenario is mentioned here: http://blackriver.to/2012/08/android-annoying-exception-unable-to-add-window-is-your-activity-running/

    Make sure you handle both of them

提交回复
热议问题