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
How to enable Inspection, after being Disabled in Android Studio?
提问by Arjun Singh
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
回答by Adam Johns
If your project is under version control, you might notice that .idea/inspectionProfiles/Project_Default.xml
and .idea/inspectionProfiles/profiles_settings.xml
were 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
回答by Robbert
I found this on google, why dont you try this out:
我在谷歌上找到了这个,你为什么不试试这个:
回答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 File→Settings Repository...→Overwrite Localwill restore a backup of your settings, including the just disabled inspection.
如果您还没有关闭 IntelliJ,
菜单File→ Settings 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).
这实际上是一个“撤消”,但您需要提前准备一个设置存储库才能使其工作。如果你还没有这样做,你就靠自己了,我建议你现在做一个以防将来发生事故(作为奖励,在多台计算机之间共享设置)。