Android 按包忽略所有lint警告错误

Android 按包忽略所有lint警告错误,android,lint,Android,Lint,我想忽略整个com包中的每个lint警告和错误 从中,我只能看到如何使用path和regexp忽略特定文件和目录的某些问题 如何忽略com包中的每个问题?尝试使用以下方法 -keep class com.example.** { public protected private *; } -dontwarn com.example.** 试着使用下面的方法 -keep class com.example.** { public protected private *; }

我想忽略整个
com
包中的每个lint警告和错误

从中,我只能看到如何使用
path
regexp
忽略特定文件和目录的某些问题


如何忽略
com
包中的每个问题?

尝试使用以下方法

-keep class com.example.** {
    public protected private *;
 }
-dontwarn com.example.**

试着使用下面的方法

-keep class com.example.** {
    public protected private *;
 }
-dontwarn com.example.**
所以试试这个:

   <lint>
       <issue id="InvalidPackage">
          <ignore regexp="com.*" />
      </issue>
   </lint>

因此请尝试以下方法:

   <lint>
       <issue id="InvalidPackage">
          <ignore regexp="com.*" />
      </issue>
   </lint>

您可以使用
id=“all”
忽略所有lint警告,以下示例来自lint报告本身:

<!-- Ignore everything in the test source set -->
<issue id="all">
    <ignore path="*/test/*" />
</issue>

因此,在您的情况下,它将非常接近@MrZ的响应:

    <issue id="all">
        <ignore regexp="com.*" />
    </issue>

您可以使用
id=“all”
忽略所有lint警告,以下示例来自lint报告本身:

<!-- Ignore everything in the test source set -->
<issue id="all">
    <ignore path="*/test/*" />
</issue>

因此,在您的情况下,它将非常接近@MrZ的响应:

    <issue id="all">
        <ignore regexp="com.*" />
    </issue>


这是proguard,与lintI无关。我很抱歉,这是proguard,与lintI无关。我很抱歉,与lintI无关。很遗憾,我必须指定问题,我希望在
com中忽略所有问题。*
是的,很遗憾,我必须指定问题,我希望在
com中忽略所有问题。*