0

我是 android 新手,如果我通过了,有时我的应用程序可以正常工作

如果我使用,

this for context // sometimes gets error  

如果我使用,

ClassName.this for context // sometimes gets error       

android.view.WindowManager$BadTokenException:
   Unable to add window -- token   
android.app.LocalActivityManager$LocalActivityRecord@40537450 is not valid; is your activity running?  

如果我使用,

getApplicationContext()

android.view.WindowManager$BadTokenException: 
Unable to add window -- token null is not for an application

如果我使用,

ClassName.this.getParent()  

我很困惑何时使用什么。

请解释

4

0 回答 0