Lint check for unused methods (command line)
android, gradle, java, lint
Solution
Run lint from the command line
You can use the Gradle wrapper to invoke the lint task for your project by entering one of the following commands from the root directory of your project:
On Windows:
gradlew lint
On Linux or Mac:
./gradlew lint
You should see output similar to the following:
> Task :app:lint
Ran lint on variant release: 5 issues found
Ran lint on variant debug: 5 issues found
Wrote HTML report to file:<path-to-project>/app/build/reports/lint-results.html
Wrote XML report to file:<path-to-project>/app/build/reports/lint-results.xml
When the lint tool completes its checks, it provides paths to the XML and HTML versions of the lint report. You can then navigate to the HTML report and open it in your browser, as shown in figure 2.
you can check the docs "Improve your code with lint checks"
Problem
How can I achieve the same what is described in the following Stack Overflow question? How can I find all unused methods of my project in the Android Studio IDEA? Using the command line only? ``` ./gradlew lint ... ```