Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exporting html report of Android Lint from Android Studio?

I came to know that we can't export xml/html reports of Android Lint in eclipse. Is it applicable to Android Studio as well?

I want to export xml / html report of Android Lint (used by - studio - analyze - Inspect Code)..

When I run it through my macbook terminal it says - -bash: ./gradlew: No such file or directory.

Let me know how can I resolve it.

like image 450
Smitha Avatar asked Feb 03 '15 06:02

Smitha


People also ask

How do I generate a lint report?

Run lint using the standalone tool If you're not using Android Studio or Gradle, you can use the standalone lint tool after you install the Android SDK Command-Line Tools from the SDK Manager. You can then locate the lint tool at android_sdk /cmdline-tools/ version /bin/lint .

What is lintOptions?

lintOptions { abortOnError false } This means it will run lint checks but won't abort the build if any lint error found. By default, its true and stops the build if errors are found.

How do you make lint baseline?

Lint Baseline Test First, create a new project. Perform a Gradle sync. Then run lint: Analyze > Inspect Code; choose the whole project. Lint should now run, the Inspections View opens up, and in the bottom right corner a bubble tells you that lint has created a baseline file with the current issues.

Which command is used to run lint using Gradle?

Invoking lint from gradle You can invoke lint in multiple ways: ./gradlew lint :will run lint on all modules for all variants. ./gradlew :app:lint :will run lint on the app module for all variants. ./gradlew :library:lint :will run lint on the library module for all variants.


1 Answers

The lint report from (./gradlew lint) is different than the Android Studio code inspection report (Analyze -> Inspect Code). It looks like it includes all the Android Lint items and lots of additional checks

Here are the steps to export the Android Studio code inspection report:

  • Run Analyze -> Inspect Code
  • Find "Inspection Results" window/panel
    • if it's not visible, try View -> Tool Windows -> Inspection Results
  • In the inspection view, at left side, you will get an option symbol to export to html/xml and then, give the path where you want that file to be stored.
    • Note that the specified directory must exist
like image 91
Smitha Avatar answered Sep 21 '22 12:09

Smitha