“'this' is not available” in debug windows of Android Studio

前端 未结 6 1255
梦如初夏
梦如初夏 2020-12-10 10:23

I get this message in debug windows in Android Studio. This is not a static method, nor is it a class. What does it mean?

6条回答
  •  伪装坚强ぢ
    2020-12-10 10:39

    I've got a simple workaround for it:

    int tmp = this.a; // tmp is available
    this.a++; // this is not available
    int tmp2 = this.a // tmp2 is available
    

提交回复
热议问题