简体   繁体   English

Android Studio禁用灯泡

[英]Android Studio disable lightbulb

I want to disable the light bulb (lint checking / intentions) in Android Studio: 我想在Android Studio中禁用灯泡(lint checking / intentions):

在此输入图像描述

Some clarifications: 一些澄清:

  1. The main reason I want to disable this light bulb, is because I find myself several times copying and pasting strings, however the light bulb gets in the way and gets accidentally clicked. 我想要禁用这个灯泡的主要原因是因为我发现自己有几次复制和粘贴字符串,但是灯泡挡住了路并被意外点击。

  2. If I press Alt+Enter, I can see the same suggestions that the light bulb is showing. 如果按Alt + Enter,我可以看到灯泡显示的相同建议。 Therefore, why would I need the light bulb to appear all the time since I can manually enable it by pressing Alt+Enter? 因此,为什么我需要灯泡一直出现,因为我可以通过按Alt + Enter手动启用它?

  3. I have already disabled all intentions in Android Studio: File > Settings > Editor > Intentions 我已经在Android Studio中禁用了所有意图:文件>设置>编辑器>意图

  4. I have already added the following line: < option name="SHOW_INTENTION_BULB" value="false" /> in %HOMEPATH%.\\config\\options\\editor.xml as suggested by other users. 我已经在其他用户建议的%HOMEPATH%。\\ config \\ options \\ editor.xml中添加了以下行:<option name =“SHOW_INTENTION_BULB”value =“false”/>。 This indeed reduces the time that the light bulb is appearing, however it stills appears when there's a warning in my code. 这确实减少了灯泡出现的时间,但是当我的代码中出现警告时它仍会出现。 I don't want to disable the warnings, I just want to make the light bulb disappear since I can always press Alt+Enter to see the available suggestions in a warning. 我不想禁用警告,我只是想让灯泡消失,因为我总是可以按Alt + Enter查看警告中的可用建议。

Thanks! 谢谢!

Settings > Editor > General > Appearance下取消选中Show intention bulb

This is currently not possible. 目前这是不可能的。 However when it is visible, pressing Esc will make the light bulb disappear. 但是当它可见时,按Esc将使灯泡消失。 See also this issue . 另见此问题

(Workaround) If you disable the entries that appear as suggestions on the light bulb, it will disappear. (解决方法)如果禁用在灯泡上显示为建议的条目,它将消失。 (Direct disabling is not possible) (不能直接禁用)

1. Settings > Editor > Inspections > Language Injection
2. Settings > Editor > Intentions > Android > Override Resource in Other Configuration ...

Thanks, Sriram 谢谢,Sriram

I find it sometimes annoying, but its very good handy & i'm sure you don't want it to be disabled forever. 我发现它有时令人讨厌,但它非常好用,我相信你不希望它永远被禁用。 however what you can do is, you could click right-arrow on Typo:Change to.. & click on disable inspection as a fast way to do it only for the meantime & not forever. 然而,你可以做的是,你可以点击Typo:Change to..上的右箭头 Typo:Change to..然后点击禁用检查作为一种快速的方式来做它只是为了同时而不是永远。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM