Lint found fatal errors while assembling a release target.

Issue #1 new
Pierre Rudloff created an issue

Hello,

assembleDebug works fine but I'm getting lint errors when running gradle assembleRelease:

:app:lintVitalRelease
/home/pierre/www/space-trader/app/src/main/java/com/brucelet/spacetrader/widget/ShortcutButton.java:63: Error: Expected resource of type styleable [ResourceType]
  int marginTop = ta.getDimensionPixelOffset(1, 0);
                                             ~
/home/pierre/www/space-trader/app/src/main/java/com/brucelet/spacetrader/widget/ShortcutButton.java:64: Error: Expected resource of type styleable [ResourceType]
  int marginBottom = ta.getDimensionPixelOffset(2, 0);
                                                ~

   Explanation for issues of type "ResourceType":
   Ensures that resource id's passed to APIs are of the right type; for
   example, calling Resources.getColor(R.string.name) is wrong.

2 errors, 0 warnings
:app:lintVitalRelease FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:lintVitalRelease'.
> Lint found fatal errors while assembling a release target.

  To proceed, either fix the issues identified by lint, or modify your build script as follows:
  ...
  android {
      lintOptions {
          checkReleaseBuilds false
          // Or, if you prefer, you can continue to check for errors in release builds,
          // but continue the build even when errors are found:
          abortOnError false
      }
  }
  ...

Comments (0)

  1. Log in to comment