Android Studio警告未在检查结果中显示

问题描述 投票:0回答:1

我似乎在代码窗口中收到更多的“黄色警告”,当我运行时,我在“检查结果”窗口中得到警告:“分析>检查代码...”

一个这样的例子是:if (myLayout == null)

消息说:Condition 'myLayout == null' is always 'false'

这是一个足够合理的警告,值得解决。如何在我的“检查结果”中显示此警告?

编辑:谢谢@Android_id的建议,但这正是我看不到的东西:enter image description here

android android-studio warnings review
1个回答
0
投票

这些警告在Warning窗口的Inspection results选项中可用。您可以切换按钮Group by Severity并根据严重性排列结果。您将获得有序格式的[[错误,警告,弱警告,错字,..,>现在您可以阅读在窗口中提到的相关警告,例如Warning-->Java-->Probable bugs-->Constant conditions & exceptions-->Your activity

更新:单击“检查结果”窗口左下方的edit settings图标,然后验证是否在java选项下启用了Probable bugs

Can see the screenshotCan see the screenshotverify by screenshot

© www.soinside.com 2019 - 2024. All rights reserved.