关闭一个恼人的检验,Android Studio中 [英] Turn off an annoying Inspection, in Android Studio

查看:1361
本文介绍了关闭一个恼人的检验,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:


  1. 导航到该列出了警告,由检验引起了code部分

  2. 按<大骨节病>替代 + <大骨节病>输入

  3. 从该菜单中,你可以浏览到的编辑检查配置文件设置

  4. 在那里,您可以更改检查的级别(错误/警告/信息/ ...)或完全禁用它

另外,您可以找到的设置/检查

这篇关于关闭一个恼人的检验,Android Studio中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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