Skip to content

Comments

[ADDED] lint-baseline.xml to ignore MainActivity [Instantiatable] lint#337

Merged
hossain-khan merged 1 commit intomainfrom
add-baseline
Jul 21, 2025
Merged

[ADDED] lint-baseline.xml to ignore MainActivity [Instantiatable] lint#337
hossain-khan merged 1 commit intomainfrom
add-baseline

Conversation

@hossain-khan
Copy link
Owner

False positive.

https://github.com/hossain-khan/android-remote-notify/actions/runs/16417881446/job/46388249169

> Task :app:lintDebug FAILED
Lint found 1 error, 85 warnings. First failure:

Error: /home/runner/work/android-remote-notify/android-remote-notify/app/src/main/AndroidManifest.xml:20: Error: This class should provide a default constructor (a public constructor with no arguments) (dev.hossain.remotenotify.MainActivity) [Instantiatable]
            android:name="dev.hossain.remotenotify.MainActivity"
                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

   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.

   If you use a custom AppComponentFactory to instantiate app components
   yourself, consider disabling this Lint issue in order to avoid false
   positives.

The full lint text report is located at:
  /home/runner/work/android-remote-notify/android-remote-notify/app/build/intermediates/lint_intermediate_text_report/debug/lintReportDebug/lint-results-debug.txt
gradle/actions: Writing build results to /home/runner/work/_temp/.gradle-actions/build-results/__run-1753103395126.json

[Incubating] Problems report is available at: file:///home/runner/work/android-remote-notify/android-remote-notify/build/reports/problems/problems-report.html
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:lintDebug'.
> Lint found errors in the project; aborting build.

  Fix the issues identified by lint, or create a baseline to see only new errors.
  To create a baseline, run `gradlew updateLintBaseline` after adding the following to the module's build.gradle file:

android {
lint {
baseline = file("lint-baseline.xml")
}
}

For more details, see https://developer.android.com/studio/write/lint#snapshot

Lint found 1 error, 85 warnings. First failure:

Error:   /home/runner/work/android-remote-notify/android-remote-notify/app/src/main/AndroidManifest.xml:20: Error: This class should provide a default constructor (a public constructor with no arguments) (dev.hossain.remotenotify.MainActivity) [Instantiatable]
            android:name="dev.hossain.remotenotify.MainActivity"
                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

   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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
   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.

   If you use a custom AppComponentFactory to instantiate app components
   yourself, consider disabling this Lint issue in order to avoid false
   positives.

The full lint text report is located at:
  /home/runner/work/android-remote-notify/android-remote-notify/app/build/intermediates/lint_intermediate_text_report/debug/lintReportDebug/lint-results-debug.txt

… lint

False positive.

https://github.com/hossain-khan/android-remote-notify/actions/runs/16417881446/job/46388249169

```
> Task :app:lintDebug FAILED
Lint found 1 error, 85 warnings. First failure:

Error: /home/runner/work/android-remote-notify/android-remote-notify/app/src/main/AndroidManifest.xml:20: Error: This class should provide a default constructor (a public constructor with no arguments) (dev.hossain.remotenotify.MainActivity) [Instantiatable]
            android:name="dev.hossain.remotenotify.MainActivity"
                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

   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.

   If you use a custom AppComponentFactory to instantiate app components
   yourself, consider disabling this Lint issue in order to avoid false
   positives.

The full lint text report is located at:
  /home/runner/work/android-remote-notify/android-remote-notify/app/build/intermediates/lint_intermediate_text_report/debug/lintReportDebug/lint-results-debug.txt
gradle/actions: Writing build results to /home/runner/work/_temp/.gradle-actions/build-results/__run-1753103395126.json

[Incubating] Problems report is available at: file:///home/runner/work/android-remote-notify/android-remote-notify/build/reports/problems/problems-report.html
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:lintDebug'.
> Lint found errors in the project; aborting build.

  Fix the issues identified by lint, or create a baseline to see only new errors.
  To create a baseline, run `gradlew updateLintBaseline` after adding the following to the module's build.gradle file:
  ```
  android {
      lint {
          baseline = file("lint-baseline.xml")
      }
  }
  ```
  For more details, see https://developer.android.com/studio/write/lint#snapshot

  Lint found 1 error, 85 warnings. First failure:

Error:   /home/runner/work/android-remote-notify/android-remote-notify/app/src/main/AndroidManifest.xml:20: Error: This class should provide a default constructor (a public constructor with no arguments) (dev.hossain.remotenotify.MainActivity) [Instantiatable]
              android:name="dev.hossain.remotenotify.MainActivity"
                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

     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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
     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.

     If you use a custom AppComponentFactory to instantiate app components
     yourself, consider disabling this Lint issue in order to avoid false
     positives.

  The full lint text report is located at:
    /home/runner/work/android-remote-notify/android-remote-notify/app/build/intermediates/lint_intermediate_text_report/debug/lintReportDebug/lint-results-debug.txt

```
@hossain-khan hossain-khan enabled auto-merge July 21, 2025 13:22
@github-actions
Copy link

Code Coverage Report

View Coverage Report

@hossain-khan hossain-khan merged commit aca5ff3 into main Jul 21, 2025
4 checks passed
@hossain-khan hossain-khan deleted the add-baseline branch July 21, 2025 13:24
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 35.50%. Comparing base (d1af486) to head (cf6f9db).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #337   +/-   ##
=======================================
  Coverage   35.50%   35.50%           
=======================================
  Files          79       79           
  Lines        1952     1952           
  Branches      154      154           
=======================================
  Hits          693      693           
  Misses       1232     1232           
  Partials       27       27           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants