关闭一个恼人的检验,Android Studio中 [英] Turn off an annoying Inspection, in Android Studio
问题描述
我与Android棒棒糖的的jobscheduler
工作。 Android的工作室检举此code:
I'm working with Android Lollypop's JobScheduler
. Android Studio is flagging this code:
JobScheduler js = (JobScheduler) getSystemService(Context.JOB_SCHEDULER_SERVICE);
...为错误。它编译罚款。工作室,不过,认为它知道所有的法律服务,并将其标记。
... as an error. It compiles fine. Studio, though, thinks it knows all of the legal services, and marks it.
我猜,这是一个检查。我搜索了错误信息,开始必之一:Context.POWER_SERVICE检查。并没有发现什么
I'm guessing that this is an "Inspection". I searched inspections for the error message, which begins "Must be one of: Context.POWER_SERVICE" and didn't find anything.
这使我的具体问题:我怎么可以关闭这一点,特别是恼人的错误。此外,更普遍的问题:在一般情况下,如果一个检查很讨厌我,我怎么找到它,这样我就可以把它关掉?
This leads me to the specific question: "how can I turn off this, particular, annoying error". Also, the more general question: "In general, if an inspection is annoying me, how do I find it, so that I can turn it off?"
推荐答案
禁用你不想在基础的IntelliJ IDE中检查一般方式:
General way to disable inspections you don't want in IntelliJ based IDEs:
- 导航到该列出了警告,由检验引起了code部分
- 按<大骨节病>替代骨节病> + <大骨节病>输入骨节病>
- 从该菜单中,你可以浏览到的编辑检查配置文件设置的
- 在那里,您可以更改检查的级别(错误/警告/信息/ ...)或完全禁用它
另外,您可以找到的设置/检查的
这篇关于关闭一个恼人的检验,Android Studio中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!