【问题标题】:Is there a way to suppress warning "Commented out code (n lines)" in Android Studio?有没有办法在 Android Studio 中抑制警告“注释掉代码(n 行)”?
【发布时间】:2023-01-31 19:21:40
【问题描述】:

我知道,这不是一个好的做法,但 Android Studio 中有没有办法抑制警告“Commented out code (n lines)”?

【问题讨论】:

    标签: android-studio


    【解决方案1】:

    在评论的第一行添加 noinspection 对我有用:

    /* noinspection
     multiline 
     comment
     goes
     here
    */
    

    【讨论】:

      【解决方案2】:

      使用这种方式,这在 Android Studio 和 Intellij Idea 中都适用于我:

      /*/ first line
        second line 
        ...
        n line */
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2011-08-02
        • 1970-01-01
        • 2010-09-16
        • 1970-01-01
        • 2012-10-10
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多