Example error:
* What went wrong: Execution failed for task ':app:compileDebugJavaWithJavac'. > Could not find tools.jar. Please check that C:\Program Files\Java\jre1.8.0_231 contains a valid JDK installation.
Solution: add line
org.gradle.java.home=E:\\SETUP\\System\\jdk-15
to file gradle.properties