java - Android Studio 3.3 Java 8 debugger "this" is not available in lambdas and cannot stop on "if"
问题描述
I have changed my Android Java version to 8 wanting to simplify some code writing. An issue I am having, and I cannot figure out, is that I am getting a 'this' is not available
in the debugger for the class properties when they are inside a lambda expression. As mentioned in the title I have updated to the latest Android Studio 3.3.
I have been searching around for some time now trying to figure out what I am doing wrong but with no luck.
Another issue that I am having is that when in lambdas (and anonymous in general) the debugger cannot stop on if
statements (visually the breakpoint red circle never gets a tick mark), something I am pretty sure I could do before. Are there changes (or settings) in Android Studio 3.3 that caused this? What am I missing?
Any ideas/solution would be much appreciated.
EDIT:
There is another question concerning the if
breakpoints issue specifically. The OP there gives a very generic answer that I am not satisfied with and it doesn't answer the why.
What I noticed is that the if statements that have complicated logic in them do not get active breakpoints. So an if (object.getSomething() == something)
will not work, but if you assign that to a value and then use the value in the comparison it works just fine... mystery deepens.
解决方案
推荐阅读
- java - 修复 android 中的日历区域设置
- c# - 如何将 Stream (C#) 传递给 ifStream (C++ CLI)?
- python - Numpy 随机播放数组的子集
- c# - 如何将过期设置设置为信封定义?
- python - 如何使用内嵌图像保存 gmail 草稿?
- java - My server program is unable to send data to the client program I wrote
- mysql - Prestashop 安装问题 - 未启用 MySQL 支持
- javascript - 基于寡妇宽度的反应弹出窗口
- javascript - How to get more detail than 'Webpack Compilation Error' with Cypress?
- postgresql - Should I do ORDER BY twice when selecting from subquery?