0

I'm trying to execute Android Lint tests on windows without using Android Studio or Android SDK.

I tried following approach as it is stated in the documentation that it's not required to have gradle or android studio. This requires to download command line tools for Android SDK. Then executing below,

cd C:\Users\User\Desktop\sdk-tools-windows-3859397\tools\bin
lint \path\to\project\location

Executing above results in,

myapp: Error: "myapp" is a Gradle project. To correctly analyze Gradle projects, you should run "gradlew :lint" instead. [LintError]

Then I tried using gradle,

cd \path\to\project\location
gradlew lint

Then it throws following error,

A problem occurred configuring project ':app'.
> The SDK directory 'C:\Users\Test\AppData\Local\Android\sdk' does not exist.

Is it not possible to execute Android Lint only using Android SDK command line tools?

channae
  • 951
  • 1
  • 12
  • 28

1 Answers1

0

I pointed ANDROID_HOME to the Android SDK tools directory in system variables.

Then executed below,

cd \path\to\project\location
gradlew lint

I'm following this approach for now. But this is confusing since the the official android developer documentation of lint, it mentions we can use "lint" as standalone with android projects. Here as the workaround i'm using "gradlew lint"

channae
  • 951
  • 1
  • 12
  • 28