设置android studio警告级别 [英] Set android studio warning levels

查看:142
本文介绍了设置android studio警告级别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试与 android studio 合作,到目前为止一切顺利.然而,它到处都有黄色的索引、警告、灯泡等!

I'm trying to work with android studio, and so far so good. However, it has yellow indexes, warnings, lightbulbs, (etc) all over the place!

这是个问题.不,我的代码实际上并没有充满真正的警告,它主要是风格挑剔的项目,例如简化"FLAG_AUTOSAVE == 假到!FLAG_AUTOSAVE

Which is a problem. No, my code isn't actually filled with real warnings, it's mostly style nitpicking items such as "Simplify" FLAG_AUTOSAVE == false to !FLAG_AUTOSAVE

哪个,不,我不想这样做,这不是我的风格,我喜欢我的代码一目了然.

Which, no I don't want to do, that isn't my style, I like my code to be more clear at a glance.

或者实际上不正确的建议,例如更改正确覆盖的方法的签名.(嗯,它仍然是 1.x 版......)

Or actually incorrect advice like change the signature of an correctly overridden method. (well it is still version 1.x...)

无论我的风格是否完美,我都需要这些东西消失这样我才能看到真正的警告.

Regardless if my style is perfect or not, I need these to go away So I can see the real warnings.

推荐答案

最新版本的 Android Studio (2.1) 似乎在警告方面具有更大的灵活性.设置->编辑器->检查大大增加.然后使用搜索功能来帮助查找您想要禁用的警告/错误.然后点击您喜欢的设置的复选框.

The latest version of Android Studio (2.1) seems to have a lot more flexibility with its warnings. Settings -> Editor -> Inspections has increased greatly. Then use the search feature to help find the warnings/errors you want to dis(en)able. Then click the checkboxes for the settings you like.

不要忘记在下拉框中选择默认"或项目默认".

Don't forget to choose "Default" or "Project Default" in the drop-down box.

在这张图片中,我设法找到了您的具体问题(我完全同意您的看法!),我未选中该问题.

In this image I managed to find your specific issue (I completely agree with you about that one!) which I unchecked.

这篇关于设置android studio警告级别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆