android / codelab-android-hilt

Apache License 2.0
348 stars 184 forks source link

':app:lintVitalReleasePro'. #30

Open weiggle opened 2 years ago

weiggle commented 2 years ago

when i use hilt in my multi module project, the debug mode is successful, but when in "./gradlew clean assembleReleasePro " it broked by error in Task :app:lintVitalReleasePro FAILED details: Error: MyApplication must extend android.app.Application [Instantiatable] android:name=".MyApplication"



   Explanation for issues of type "Instantiatable":
   Activities, services, broadcast receivers etc. registered in the manifest
   file (or for custom views, in a layout file) must be "instantiatable" by
   the system, which means that the class must be public, it must have an
   empty public constructor, and if it's an inner class, it must be a static
   inner class.

1 errors, 0 warnings

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:lintVitalReleasePro'.
> 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
      }
  }
  ...

i try to do lintOptions in my project, but it's not userful,