移除];从未使用&QUOT方法;预警Android Studio中的OnClick注解 [英] Remove "Method is never used" warning for OnClick annotation in Android Studio
问题描述
很抱歉,如果这个问题已经被问了。我使用的奶油刀5.0与Android工作室的最新版本(0.5.7)。如何删除从未使用方法的警告对于使用ButterKnife.I的的onClick诠释方法注意到Eclipse的犯规给这个警告对的onClick的方法。在此先感谢
Sorry if this question has been asked before. I am using the Butterknife 5.0 with the latest version of Android Studio(0.5.7). How can I remove the "Method is never used" warning for methods that use the 'OnClick' Annotation of ButterKnife.I noticed that Eclipse doesnt give this warning for the 'OnClick' methods. Thanks in advance
推荐答案
在Android Studio中的正确方法燮preSS这些警告是preSS的 Alt + Enter键的方法给人的方法'yourFunction中()'从未使用过的警告,并选择
The correct way in Android Studio to suppress these warnings is to press Alt+Enter on the method giving the Method 'yourFunction()' is never used warning, and selecting
Suppress for methods annotated by 'butterknife.OnClick'
这篇关于移除];从未使用&QUOT方法;预警Android Studio中的OnClick注解的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!