java 在 Android Studio 中禁用后如何启用检查?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/36495506/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-11-03 01:31:35  来源:igfitidea点击:

How to enable Inspection, after being Disabled in Android Studio?

javaandroidfunctionproperties

提问by Arjun Singh

enter image description here

在此处输入图片说明

Problem:

问题:

In my manifest my application word was having Yellow Background, when I do Alt+Enter it gives me above options, I clicked Disable inspection just to check it, but when I do Alt+enter, but again after doing alt+enter I didn't get any option for getting it enabled?

在我的清单中,我的应用程序字有黄色背景,当我执行 Alt+Enter 时,它给了我上面的选项,我单击禁用检查只是为了检查它,但是当我执行 Alt+enter 时,但在执行 Alt+Enter 后我又没有'没有任何选项可以启用它?

After clicking Disable Inspection, I am not getting any option for Enable Inspection, Is there any way to get Enabled again?

单击禁用检查后,我没有任何启用检查的选项,有什么办法可以再次启用?

回答by Anton Shkurenko

You can find and disable/enable all inspections here.

您可以在此处找到并禁用/启用所有检查。

Settings lint isnpections

设置 lint 检查

For your situation, you have to find and make selected this two:

对于您的情况,您必须找到并选择这两个:

Google app indexingAllow backup

谷歌应用索引允许备份

回答by Adam Johns

If your project is under version control, you might notice that .idea/inspectionProfiles/Project_Default.xmland .idea/inspectionProfiles/profiles_settings.xmlwere either added or changed. You could just reset or remove those files (Making sure to only reset the parts you want to re-enable.)

如果你的项目是版本控制之下,你可能会注意到,.idea/inspectionProfiles/Project_Default.xml.idea/inspectionProfiles/profiles_settings.xml要么添加或更改。您可以重置或删除这些文件(确保只重置要重新启用的部分。)

回答by DigaoParceiro

If you want to restore all inspections to default, you can go to: File> Settings> Inspections> Click on Advanced Settings
enter image description here

如果要将所有检查恢复为默认值,可以转到: 文件>设置>检查>单击高级设置
在此处输入图片说明

and Reset to Default Settings

重置为默认设置

回答by Bui Quang Huy

Go to File-> Setting-> Editor-> Inspectionand mark which inspection that you want to enable.

转到文件->设置->编辑器->检查并标记要启用的检查。

回答by Mark Jeronimus

If you haven't closed IntelliJ yet,
Menu FileSettings Repository...Overwrite Localwill restore a backup of your settings, including the just disabled inspection.

如果您还没有关闭 IntelliJ,
菜单FileSettings Repository...Overwrite Local将恢复您的设置备份,包括刚刚禁用的检查。

This is effectively an 'undo' but you need to have prepared a settings repository in advance for it to work. If you haven't done this yet, you're on your own, and I suggest you make one now for future accidents (and as a bonus, for sharing settings among multiple computers).

这实际上是一个“撤消”,但您需要提前准备一个设置存储库才能使其工作。如果你还没有这样做,你就靠自己了,我建议你现在做一个以防将来发生事故(作为奖励,在多台计算机之间共享设置)。