popuwindows使用时出现异常:

android.view.WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running?

解决方法: 
应把pop.showAtLocation(parent, Gravity.TOP,0, 0)这一句移出oncreate方法,在控件渲染完毕后再使用

OK了

相关文章:

  • 2021-12-17
  • 2022-12-23
  • 2021-08-03
  • 2022-01-02
  • 2022-12-23
  • 2022-12-23
  • 2022-01-02
猜你喜欢
  • 2021-09-30
  • 2021-05-25
  • 2022-03-07
  • 2021-05-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案