I want to run gradlew :lint
on my project.
But,I am getting Error:
C:\[ProjectName]>gradlew :lint
Starting a Gradle Daemon, 1 incompatible and 3 stopped Daemons could not be reused, use --status for details
Incremental java compilation is an incubating feature.
FAILURE: Build failed with an exception.
* What went wrong:
Task 'lint' not found in root project '[ProjectName]'. Some candidates are: 'init'.
* Try:
Run gradlew tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 1 mins 27.334 secs
When I run: gradlew lint
I get Error:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Could not find tools.jar. Please check that C:\Program Files\Java\jre1.8.0_151 contains a valid JDK installation.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
I can't search for any solution online.