首页 > 解决方案 > 如何让 Gradle Lint 任务显示所有错误?

问题描述

当我尝试运行 ./gradlew :form:lintRelease 任务时,它只显示 34 个错误中的 3 个。如何使命令显示所有错误?

The first 3 errors (out of 34) were:
  /Users/semyon/Projects/Reddit3/ads/domain/src/main/res/drawable/cta_see_menu.xml:6: Error: Very long vector path (926 characters), which is bad for performance. Considering reducing precision, removing minor details or rasterizing vector. [VectorPath]
      <path android:fillColor="#FFFFFF" android:pathData="M30.3,21.2L24.5,21.2C24.3,21.2 24,20.9 24,20.7c0,-0.3 0.2,-0.5 0.5,-0.5h5.8c0.3,0 0.5,0.2 0.5,0.5C30.8,20.9 30.5,21.2 30.3,21.2zM30.3,25.5L24.5,25.5C24.3,25.5 24,25.3 24,25s0.2,-0.5 0.5,-0.5h5.8c0.3,0 0.5,0.2 0.5,0.5S30.5,25.5 30.3,25.5zM30.3,29.8L24.5,29.8c-0.3,0 -0.5,-0.2 -0.5,-0.5c0,-0.3 0.2,-0.5 0.5,-0.5h5.8c0.3,0 0.5,0.2 0.5,0.5C30.8,29.6 30.5,29.8 30.3,29.8zM22.1,21.6c0,0.3 -0.2,0.5 -0.5,0.5L19.7,22.1c-0.3,0 -0.5,-0.2 -0.5,-0.5L19.2,19.7c0,-0.3 0.2,-0.5 0.5,-0.5h1.9c0.3,0 0.5,0.2 0.5,0.5L22.1,21.6zM22.1,26c0,0.3 -0.2,0.5 -0.5,0.5L19.7,26.5c-0.3,0 -0.5,-0.2 -0.5,-0.5L19.2,24c0,-0.3 0.2,-0.5 0.5,-0.5h1.9c0.3,0 0.5,0.2 0.5,0.5L22.1,26zM22.1,30.3c0,0.3 -0.2,0.5 -0.5,0.5L19.7,30.8c-0.3,0 -0.5,-0.2 -0.5,-0.5v-1.9c0,-0.3 0.2,-0.5 0.5,-0.5h1.9c0.3,0 0.5,0.2 0.5,0.5L22.1,30.3zM30.8,17.3L19.2,17.3c-1.1,0 -1.9,0.9 -1.9,1.9v11.5c0,1.1 0.9,1.9 1.9,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main/res/drawable/ic_icon_ban.xml:9: Error: Very long vector path (872 characters), which is bad for performance. Considering reducing precision, removing minor details or rasterizing vector. [VectorPath]
        android:pathData="M16.0215 9.3638c0 0.265 -0.105 0.52 -0.293 0.707l-3.829 3.829c-0.195 0.195 -0.451 0.293 -0.707 0.293 -0.256 0 -0.512 -0.098 -0.707 -0.293l-1.414 -1.415 -5.364 5.364c-0.196 0.196 -0.452 0.293 -0.707 0.293 -0.256 0 -0.512 -0.097 -0.708 -0.293 -0.39 -0.39 -0.39 -1.023 0 -1.414l5.365 -5.364 -1.414 -1.414c-0.391 -0.391 -0.391 -1.023 0 -1.414l3.828 -3.829c0.375 -0.375 1.039 -0.375 1.414 0l4.243 4.243c0.188 0.187 0.293 0.442 0.293 0.707zM4.8291 7.8286c-0.256 0 -0.512 -0.098 -0.707 -0.293 -0.391 -0.391 -0.391 -1.023 0 -1.414l3.828 -3.829c0.391 -0.39 1.024 -0.39 1.414 0 0.391 0.391 0.391 1.024 0 1.414l-3.828 3.829c-0.195 0.195 -0.451 0.293 -0.707 0.293zm13.0205 2.9497c0.391 0.391 0.391 1.023 0 1.414l-3.828 3.828c-0.195 0.195 -0.451 0.293 -0.707 0.293 -0.256 0 -0.512 -0.098 -0.707 -0.293 -0.391 -0.39 -0.391 -1.023 0 -1.414l3.828 -3.828c0.391 -0.391 1.023 -0.391 1.414 0z"/>
                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /Users/semyon/Projects/Reddit3/themes/src/main/res/drawable/ic_icon_ban_new.xml:4: Error: Very long vector path (838 characters), which is bad for performance. Considering reducing precision, removing minor details or rasterizing vector. [VectorPath]
          android:pathData="M7.5,8.75 L7.5,2 L12.5,2 L12.5,8.75 L11.25,8.75 L11.25,18.5125 C11.25,19.1955 10.696,19.75 10.0125,19.75 L9.9875,19.75 C9.304,19.75 8.75,19.1955 8.75,18.5125 L8.75,8.75 L7.5,8.75 Z M6,1.5 C6.276,1.5 6.5,1.724 6.5,2 L6.5,9.25 C6.5,9.526 6.276,9.75 6,9.75 C5.724,9.75 5.5,9.526 5.5,9.25 L5.5,2 C5.5,1.724 5.724,1.5 6,1.5 Z M13.5,1.5 C13.776,1.5 14,1.724 14,2 L14,9.25 C14,9.526 13.776,9.75 13.5,9.75 C13.224,9.75 13,9.526 13,9.25 L13,2 C13,1.724 13.224,1.5 13.5,1.5 Z M3.7625,1 C4.446,1 5,1.554 5,2.2375 L5,8.5125 C5,9.1955 4.446,9.75 3.7625,9.75 L3.7375,9.75 C3.054,9.75 2.5,9.1955 2.5,8.5125 L2.5,2.2375 C2.5,1.554 3.054,1 3.7375,1 L3.7625,1 Z M16.2625,1 C16.946,1 17.5,1.554 17.5,2.2375 L17.5,8.5125 C17.5,9.1955 16.946,9.75 16.2625,9.75 L16.2375,9.75 C15.554,9.75 15,9.1955 15,8.5125 L15,2.2375 C15,1.554 15.554,1 16.2375,1 L16.2625,1 Z" android:strokeWidth="1"/>
                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

标签: androidgradlelint

解决方案


您可以将 lintOption 设置为 showAll 为 true。

android {
   lintOptions {        
      // if true, show all locations for an error, do not truncate lists, etc.
      showAll true
   }
}

推荐阅读